Skip to contentSkip to conversation

OCFS2: add IO error check in ocfs2_get_sector()

PATCH New wengang wang 1 participant 1 message Feb 12, 2009 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OCFS2: add IO error check in ocfs2_get_sector()

checks IO error in ocfs2_get_sector().

this patch is based on 1.4 git.

--

ocfs2/super.c +5 -0
Index: fs/ocfs2/super.c
===================================================================
@@ -1203,6 +1203,11 @@ 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);
+		return -EIO;
+	}
+
 	return 0;
 }