]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: wengang wang <wen.gang.wang@oracle.com> |
2 | Date: Fri, 13 Feb 2009 10:11:47 +0800 | |
3 | Subject: [PATCH] ocfs2: add IO error check in ocfs2_get_sector() | |
4 | Patch-mainline: 2.6.29 | |
5 | ||
6 | Check for IO error in ocfs2_get_sector(). | |
7 | ||
8 | Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com> | |
9 | Signed-off-by: Mark Fasheh <mfasheh@suse.com> | |
10 | --- | |
11 | fs/ocfs2/super.c | 7 +++++++ | |
12 | 1 files changed, 7 insertions(+), 0 deletions(-) | |
13 | ||
14 | Index: linux-2.6.27-sle11_ocfs2_update2/fs/ocfs2/super.c | |
15 | =================================================================== | |
16 | --- linux-2.6.27-sle11_ocfs2_update2.orig/fs/ocfs2/super.c | |
17 | +++ linux-2.6.27-sle11_ocfs2_update2/fs/ocfs2/super.c | |
18 | @@ -1538,6 +1538,13 @@ static int ocfs2_get_sector(struct super | |
19 | unlock_buffer(*bh); | |
20 | ll_rw_block(READ, 1, bh); | |
21 | wait_on_buffer(*bh); | |
22 | + if (!buffer_uptodate(*bh)) { | |
23 | + mlog_errno(-EIO); | |
24 | + brelse(*bh); | |
25 | + *bh = NULL; | |
26 | + return -EIO; | |
27 | + } | |
28 | + | |
29 | return 0; | |
30 | } | |
31 |