]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ocfs2: add IO error check in ocfs2_get_sector()
authorwengang wang <wen.gang.wang@oracle.com>
Fri, 13 Feb 2009 02:11:47 +0000 (10:11 +0800)
committerMark Fasheh <mfasheh@suse.com>
Thu, 26 Feb 2009 19:51:12 +0000 (11:51 -0800)
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>
fs/ocfs2/super.c

index 1c3acc4654d8273f213e3ab970dec32fbd86ca09..7ac83a81ee55d86466329d7f9b568432666b5144 100644 (file)
@@ -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;
 }