]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.fixes/ocfs2-add-io-error-check-in-ocfs2_get_sector.patch
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / ocfs2-add-io-error-check-in-ocfs2_get_sector.patch
CommitLineData
00e5a55c
BS
1From: wengang wang <wen.gang.wang@oracle.com>
2Date: Fri, 13 Feb 2009 10:11:47 +0800
3Subject: [PATCH] ocfs2: add IO error check in ocfs2_get_sector()
4Patch-mainline: 2.6.29
5
6Check for IO error in ocfs2_get_sector().
7
8Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
9Signed-off-by: Mark Fasheh <mfasheh@suse.com>
10---
11 fs/ocfs2/super.c | 7 +++++++
12 1 files changed, 7 insertions(+), 0 deletions(-)
13
14Index: 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