summaryrefslogtreecommitdiff
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-10-21 05:25:56 +0400
committerMark Fasheh <mfasheh@suse.com>2008-11-10 20:51:45 +0300
commitbd60bd37ade4321ecce4ed4442f68c88febd76d5 (patch)
tree69d9eb6d24eb31c25a493f8a998f33619c5e8559 /fs/ocfs2
parentb37c4d84e9d16fd5b6f31197f02ea0a112fc9e99 (diff)
downloadlinux-bd60bd37ade4321ecce4ed4442f68c88febd76d5.tar.xz
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')
-rw-r--r--fs/ocfs2/xattr.c6
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,
if (data_bh)
ocfs2_journal_dirty(handle, data_bh);
- ocfs2_xattr_update_xattr_search(inode, xs, xb_bh, xh_bh);
+ ret = ocfs2_xattr_update_xattr_search(inode, xs, xb_bh, xh_bh);
+ if (ret) {
+ mlog_errno(ret);
+ goto out_commit;
+ }
/* Change from ocfs2_xattr_header to ocfs2_xattr_tree_root */
memset(&xb->xb_attrs, 0, inode->i_sb->s_blocksize -