[Ocfs2-devel] [PATCH 06/26] ocfs2: add IO error check in ocfs2_get_sector()
Sunil Mushran
sunil.mushran at oracle.com
Fri Apr 17 13:37:19 PDT 2009
From: wengang wang <wen.gang.wang at oracle.com>
Mainline commit 28d57d437786eb3e44f1ca3f0f41e7cfe29c6dd4
Check for IO error in ocfs2_get_sector().
Signed-off-by: Wengang Wang <wen.gang.wang at oracle.com>
Signed-off-by: Mark Fasheh <mfasheh at suse.com>
---
fs/ocfs2/super.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 535ccb5..5f5cb0f 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -1203,6 +1203,13 @@ static int ocfs2_get_sector(struct super_block *sb,
unlock_buffer(*bh);
ll_rw_block(READ, 1, bh);
wait_on_buffer(*bh);
+ if (!buffer_uptodate(*bh)) {
+ mlog_errno(-EIO);
+ brelse(*bh);
+ *bh = NULL;
+ return -EIO;
+ }
+
return 0;
}
--
1.5.6.3
More information about the Ocfs2-devel
mailing list