From: wengang wang Date: Fri, 13 Feb 2009 02:11:47 +0000 (+0800) Subject: ocfs2: add IO error check in ocfs2_get_sector() X-Git-Tag: v2.6.29-rc7~44^2 X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Flinux-2.6;a=commitdiff_plain;h=28d57d437786eb3e44f1ca3f0f41e7cfe29c6dd4 ocfs2: add IO error check in ocfs2_get_sector() Check for IO error in ocfs2_get_sector(). Signed-off-by: Wengang Wang Signed-off-by: Mark Fasheh --- diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 1c3acc4..7ac83a8 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c @@ -1537,6 +1537,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; }