]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
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() | |
4 | ||
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. | |
8 | ||
9 | Signed-off-by: Joel Becker <joel.becker@oracle.com> | |
10 | Signed-off-by: Mark Fasheh <mfasheh@suse.com> | |
11 | --- | |
12 | fs/ocfs2/xattr.c | 6 +++++- | |
13 | 1 files changed, 5 insertions(+), 1 deletions(-) | |
14 | ||
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 | |
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 - |