Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd60bd37 authored by Joel Becker's avatar Joel Becker Committed by Mark Fasheh
Browse files

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: default avatarJoel Becker <joel.becker@oracle.com>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent b37c4d84
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -2825,7 +2825,11 @@ static int ocfs2_xattr_create_index_block(struct inode *inode,
	if (data_bh)
	if (data_bh)
		ocfs2_journal_dirty(handle, 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 */
	/* Change from ocfs2_xattr_header to ocfs2_xattr_tree_root */
	memset(&xb->xb_attrs, 0, inode->i_sb->s_blocksize -
	memset(&xb->xb_attrs, 0, inode->i_sb->s_blocksize -