diff options
author | Joel Becker <joel.becker@oracle.com> | 2008-10-20 21:25:56 -0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-11-10 12:51:45 -0500 |
commit | bd60bd37ade4321ecce4ed4442f68c88febd76d5 (patch) | |
tree | 69d9eb6d24eb31c25a493f8a998f33619c5e8559 /fs/ocfs2/xattr.c | |
parent | b37c4d84e9d16fd5b6f31197f02ea0a112fc9e99 (diff) |
ocfs2: Check errors from ocfs2_xattr_update_xattr_search()
The ocfs2_xattr_update_xattr_search() function can return an error when
trying to read blocks off of disk. The caller needs to check this error
before using those (possibly invalid) blocks.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/xattr.c')
-rw-r--r-- | fs/ocfs2/xattr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 41a6ca004ae3..92df88a41e5d 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c | |||
@@ -2825,7 +2825,11 @@ static int ocfs2_xattr_create_index_block(struct inode *inode, | |||
2825 | if (data_bh) | 2825 | if (data_bh) |
2826 | ocfs2_journal_dirty(handle, data_bh); | 2826 | ocfs2_journal_dirty(handle, data_bh); |
2827 | 2827 | ||
2828 | ocfs2_xattr_update_xattr_search(inode, xs, xb_bh, xh_bh); | 2828 | ret = ocfs2_xattr_update_xattr_search(inode, xs, xb_bh, xh_bh); |
2829 | if (ret) { | ||
2830 | mlog_errno(ret); | ||
2831 | goto out_commit; | ||
2832 | } | ||
2829 | 2833 | ||
2830 | /* Change from ocfs2_xattr_header to ocfs2_xattr_tree_root */ | 2834 | /* Change from ocfs2_xattr_header to ocfs2_xattr_tree_root */ |
2831 | memset(&xb->xb_attrs, 0, inode->i_sb->s_blocksize - | 2835 | memset(&xb->xb_attrs, 0, inode->i_sb->s_blocksize - |