[Ocfs2-devel] Initialize count in aio_write before	generic_write_checks
    Goldwyn Rodrigues 
    rgoldwyn at gmail.com
       
    Sat Jul 11 08:57:27 PDT 2009
    
    
  
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 <rgoldwyn at suse.de>
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index a5887df..5b9c8af 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -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)
-- 
Goldwyn
    
    
More information about the Ocfs2-devel
mailing list