[Ocfs2-devel] [PATCH 1/1] OCFS2: add IO error check in ocfs2_get_sector() -v2

wengang wang wen.gang.wang at oracle.com
Wed Feb 11 23:47:26 PST 2009


checks IO error in ocfs2_get_sector().

this patch is based on 1.4 git.

Signed-off-by: Wengang wang <wen.gang.wang at oracle.com>
--
Index: fs/ocfs2/super.c
===================================================================
--- fs/ocfs2/super.c	(revision 128)
+++ fs/ocfs2/super.c	(working copy)
@@ -1203,6 +1203,12 @@ static int ocfs2_get_sector(struct super
 	unlock_buffer(*bh);
 	ll_rw_block(READ, 1, bh);
 	wait_on_buffer(*bh);
+	if (!buffer_uptodate(*bh)) {
+		mlog_errno(-EIO);
+		brelse(*bh);
+		return -EIO;
+	}
+
 	return 0;
 }
 



More information about the Ocfs2-devel mailing list