[Ocfs2-commits] zab commits r2599 - trunk/fs/ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Sep 20 15:17:44 CDT 2005


Author: zab
Signed-off-by: mfasheh
Date: 2005-09-20 15:17:43 -0500 (Tue, 20 Sep 2005)
New Revision: 2599

Modified:
   trunk/fs/ocfs2/buffer_head_io.c
Log:

o use core end_buffer_*_sync end_io calls instead of a custom one, pointed
  out by Christoph Hellwig

Signed-off-by: mfasheh


Modified: trunk/fs/ocfs2/buffer_head_io.c
===================================================================
--- trunk/fs/ocfs2/buffer_head_io.c	2005-09-20 18:37:57 UTC (rev 2598)
+++ trunk/fs/ocfs2/buffer_head_io.c	2005-09-20 20:17:43 UTC (rev 2599)
@@ -39,19 +39,6 @@
 
 #include "buffer_head_io.h"
 
-void ocfs2_end_buffer_io_sync(struct buffer_head *bh,
-			      int uptodate)
-{
-	if (!uptodate)
-		mlog_errno(-EIO);
-
-	if (uptodate)
-		set_buffer_uptodate(bh);
-	else
-		clear_buffer_uptodate(bh);
-	unlock_buffer(bh);
-}
-
 int ocfs2_write_blocks(ocfs2_super *osb, struct buffer_head *bhs[],
 		       int nr, struct inode *inode)
 {
@@ -110,7 +97,8 @@
 		/* remove from dirty list before I/O. */
 		clear_buffer_dirty(bh);
 
-		bh->b_end_io = ocfs2_end_buffer_io_sync;
+		get_bh(bh); /* for end_buffer_write_sync() */
+		bh->b_end_io = end_buffer_write_sync;
 		submit_bh(WRITE, bh);
 	}
 
@@ -238,7 +226,8 @@
 #endif
 			}
 			clear_buffer_uptodate(bh);
-			bh->b_end_io = ocfs2_end_buffer_io_sync;
+			get_bh(bh); /* for end_buffer_read_sync() */
+			bh->b_end_io = end_buffer_read_sync;
 			if (flags & OCFS2_BH_READAHEAD)
 				submit_bh(READA, bh);
 			else



More information about the Ocfs2-commits mailing list