Commit 28d57d43 authored by wengang wang's avatar wengang wang Committed by Mark Fasheh

ocfs2: add IO error check in ocfs2_get_sector()

Check for IO error in ocfs2_get_sector().
Signed-off-by: default avatarWengang Wang <wen.gang.wang@oracle.com>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent 4442f518
...@@ -1537,6 +1537,13 @@ static int ocfs2_get_sector(struct super_block *sb, ...@@ -1537,6 +1537,13 @@ static int ocfs2_get_sector(struct super_block *sb,
unlock_buffer(*bh); unlock_buffer(*bh);
ll_rw_block(READ, 1, bh); ll_rw_block(READ, 1, bh);
wait_on_buffer(*bh); wait_on_buffer(*bh);
if (!buffer_uptodate(*bh)) {
mlog_errno(-EIO);
brelse(*bh);
*bh = NULL;
return -EIO;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment