From: Goldwyn Rodrigues Subject: Initialize count in aio_write before generic_write_checks References: bnc#517098 generic_write_checks() expects count to be initialized to the size of the write. Writes to files open with O_DIRECT|O_LARGEFILE write 0 bytes because "count" is uninitialized. Signed-off-by: Goldwyn Rodrigues Signed-off-by: Sunil Mushran --- fs/ocfs2/file.c | 1 + 1 file changed, 1 insertion(+) Index: linux-2.6.27-SLE11_BRANCH/fs/ocfs2/file.c =================================================================== --- linux-2.6.27-SLE11_BRANCH.orig/fs/ocfs2/file.c 2009-07-20 19:18:59.000000000 +0200 +++ linux-2.6.27-SLE11_BRANCH/fs/ocfs2/file.c 2009-07-20 19:23:21.000000000 +0200 @@ -1855,6 +1855,7 @@ relock: if (ret) goto out_dio; + count = ocount; ret = generic_write_checks(file, ppos, &count, S_ISBLK(inode->i_mode)); if (ret)