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 in uninitialized.
Signed-off-by Goldwyn Rodrigues <[email protected]>
fs/ocfs2/file.c +1 -0
@@ -1841,6 +1841,7 @@ relock:if (ret) goto out_dio; + count = ocount; ret =generic_write_checks (file, ppos, &count,S_ISBLK (inode->i_mode));if (ret)
Signature · 1 line
Goldwyn
Quoted 7 lines · Goldwyn Rodrigues
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 in uninitialized.Signed-off-by Goldwyn Rodrigues <[email protected]>
Signed-off-by Sunil Mushran <[email protected]>
Quoted 14 lines
fs/ocfs2/file.c +1
-0@@ -1841,6 +1841,7 @@ relock:if (ret) goto out_dio; + count = ocount; ret =generic_write_checks (file, ppos, &count,S_ISBLK (inode->i_mode));if (ret)
Quoted 6 lines · Goldwyn Rodrigues
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 in uninitialized.Signed-off-by Goldwyn Rodrigues <[email protected]>
This is now in the fixes branch of ocfs2.git
Joel
Signature · 9 lines
Life's Little Instruction Book #237 "Seek out the good in people." Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127