]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.fixes/ocfs2-initialize-count-before-generic_write_checks
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / ocfs2-initialize-count-before-generic_write_checks
1 From: Goldwyn Rodrigues <rgoldwyn@suse.de>
2 Subject: Initialize count in aio_write before generic_write_checks
3 References: bnc#517098
4
5 generic_write_checks() expects count to be initialized to the size of
6 the write.
7 Writes to files open with O_DIRECT|O_LARGEFILE write 0 bytes because
8 "count" is uninitialized.
9
10 Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.de>
11 Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
12
13 ---
14 fs/ocfs2/file.c | 1 +
15 1 file changed, 1 insertion(+)
16
17 Index: linux-2.6.27-SLE11_BRANCH/fs/ocfs2/file.c
18 ===================================================================
19 --- linux-2.6.27-SLE11_BRANCH.orig/fs/ocfs2/file.c 2009-07-20 19:18:59.000000000 +0200
20 +++ linux-2.6.27-SLE11_BRANCH/fs/ocfs2/file.c 2009-07-20 19:23:21.000000000 +0200
21 @@ -1855,6 +1855,7 @@ relock:
22 if (ret)
23 goto out_dio;
24
25 + count = ocount;
26 ret = generic_write_checks(file, ppos, &count,
27 S_ISBLK(inode->i_mode));
28 if (ret)