From: Joel Becker Date: Tue, 21 Oct 2008 01:25:56 +0000 (-0700) Subject: ocfs2: Check errors from ocfs2_xattr_update_xattr_search() X-Git-Tag: v2.6.28-rc5~82^2~14 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=bd60bd37ade4321ecce4ed4442f68c88febd76d5;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Mark Fasheh --- diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 41a6ca004ae..92df88a41e5 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 -