[Ocfs2-devel] A patch to fix a typo error in ocfs_file_read(), which causes performance drop.

Zhang, Sonic sonic.zhang at intel.com
Wed Jul 28 16:08:28 CDT 2004


Hi,

	I found a typo error in ocfs_file_read(), which causes
performance drop.
	See my patch. 

	Thanks.


--------------------------------------
--- file.c.old	2004-07-28 14:58:00.018535576 +0800
+++ file.c	2004-07-28 14:58:32.835546632 +0800
@@ -853,11 +853,9 @@
 			filp->f_flags |= O_DIRECT;
 		else
 			filp->f_flags &= ~O_DIRECT;
-		ret = generic_file_write (filp, buf, count, ppos);
+		ret = generic_file_read (filp, buf, count, ppos);
 		filp->f_flags = savedflags;
 	}
-
-	ret = generic_file_read (filp, buf, count, ppos);
 #else
 	if (do_direct_io) 
 		ret = ocfs_rw_direct (READ, filp, buf, count, ppos);



More information about the Ocfs2-devel mailing list