ocfs2: add IO error check in ocfs2_get_sector()
Check for IO error in ocfs2_get_sector(). Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
This commit is contained in:
parent
4442f51826
commit
28d57d4377
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue