]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.fixes/ocfs2-Check-errors-from-ocfs2_xattr_update_xattr_se.patch
Move xen patchset to new version's subdir.
[ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / ocfs2-Check-errors-from-ocfs2_xattr_update_xattr_se.patch
CommitLineData
00e5a55c
BS
1From: Joel Becker <joel.becker@oracle.com>
2Date: Mon, 20 Oct 2008 18:25:56 -0700
3Subject: ocfs2: Check errors from ocfs2_xattr_update_xattr_search()
4
5The ocfs2_xattr_update_xattr_search() function can return an error when
6trying to read blocks off of disk. The caller needs to check this error
7before using those (possibly invalid) blocks.
8
9Signed-off-by: Joel Becker <joel.becker@oracle.com>
10Signed-off-by: Mark Fasheh <mfasheh@suse.com>
11---
12 fs/ocfs2/xattr.c | 6 +++++-
13 1 files changed, 5 insertions(+), 1 deletions(-)
14
15Index: linux-2.6.27-ocfs2/fs/ocfs2/xattr.c
16===================================================================
17--- linux-2.6.27-ocfs2.orig/fs/ocfs2/xattr.c
18+++ linux-2.6.27-ocfs2/fs/ocfs2/xattr.c
19@@ -2825,7 +2825,11 @@ static int ocfs2_xattr_create_index_bloc
20 if (data_bh)
21 ocfs2_journal_dirty(handle, data_bh);
22
23- ocfs2_xattr_update_xattr_search(inode, xs, xb_bh, xh_bh);
24+ ret = ocfs2_xattr_update_xattr_search(inode, xs, xb_bh, xh_bh);
25+ if (ret) {
26+ mlog_errno(ret);
27+ goto out_commit;
28+ }
29
30 /* Change from ocfs2_xattr_header to ocfs2_xattr_tree_root */
31 memset(&xb->xb_attrs, 0, inode->i_sb->s_blocksize -