Commit cefcb800 authored by Goldwyn Rodrigues's avatar Goldwyn Rodrigues Committed by Joel Becker
Browse files

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: default avatarGoldwyn Rodrigues <rgoldwyn@suse.de>
Signed-off-by: default avatarJoel Becker <joel.becker@oracle.com>
parent 812e7a6a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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)