Skip to content

Commit

Permalink
ocfs2: add IO error check in ocfs2_get_sector()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
wengang wang authored and Mark Fasheh committed Feb 26, 2009
1 parent 4442f51 commit 28d57d4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/ocfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 28d57d4

Please sign in to comment.