summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorGoldwyn Rodrigues <rgoldwyn@gmail.com>2009-07-11 10:57:27 -0500
committerJoel Becker <joel.becker@oracle.com>2009-07-20 15:47:58 -0700
commitcefcb800fa9536bb6f29485c53e6c82a65b0c022 (patch)
tree2ec23ec56afc83b0462d1ea141b13fd615962e41 /fs/ocfs2
parent812e7a6a43fc34bc8f70c2b80db4ea5997d66ea8 (diff)
downloadlinux-cefcb800fa9536bb6f29485c53e6c82a65b0c022.tar.gz
linux-cefcb800fa9536bb6f29485c53e6c82a65b0c022.tar.bz2
linux-cefcb800fa9536bb6f29485c53e6c82a65b0c022.zip
ocfs2: Initialize count in aio_write before generic_write_checks
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 <rgoldwyn@suse.de> Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index a49fa44aea1f..aa501d3f93f1 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1851,6 +1851,7 @@ relock:
if (ret)
goto out_dio;
+ count = ocount;
ret = generic_write_checks(file, ppos, &count,
S_ISBLK(inode->i_mode));
if (ret)