1 From: Joel Becker <joel.becker@oracle.com>
2 Date: Mon, 20 Oct 2008 18:25:56 -0700
3 Subject: ocfs2: Check errors from ocfs2_xattr_update_xattr_search()
5 The ocfs2_xattr_update_xattr_search() function can return an error when
6 trying to read blocks off of disk. The caller needs to check this error
7 before using those (possibly invalid) blocks.
9 Signed-off-by: Joel Becker <joel.becker@oracle.com>
10 Signed-off-by: Mark Fasheh <mfasheh@suse.com>
12 fs/ocfs2/xattr.c | 6 +++++-
13 1 files changed, 5 insertions(+), 1 deletions(-)
15 Index: 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
21 ocfs2_journal_dirty(handle, data_bh);
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);
30 /* Change from ocfs2_xattr_header to ocfs2_xattr_tree_root */
31 memset(&xb->xb_attrs, 0, inode->i_sb->s_blocksize -