Skip to content

Commit d250bdf

Browse files
Yang Erkuntytso
authored andcommitted
ext4: fix iloc.bh leak in ext4_xattr_inode_update_ref
The error branch for ext4_xattr_inode_update_ref forget to release the refcount for iloc.bh. Find this when review code. Fixes: 57295e8 ("ext4: guard against EA inode refcount underflow in xattr update") Signed-off-by: Yang Erkun <[email protected]> Reviewed-by: Baokun Li <[email protected]> Reviewed-by: Zhang Yi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Theodore Ts'o <[email protected]> Cc: [email protected]
1 parent 0ef7ef4 commit d250bdf

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/ext4/xattr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,6 +1037,7 @@ static int ext4_xattr_inode_update_ref(handle_t *handle, struct inode *ea_inode,
10371037
ext4_error_inode(ea_inode, __func__, __LINE__, 0,
10381038
"EA inode %lu ref wraparound: ref_count=%lld ref_change=%d",
10391039
ea_inode->i_ino, ref_count, ref_change);
1040+
brelse(iloc.bh);
10401041
ret = -EFSCORRUPTED;
10411042
goto out;
10421043
}

0 commit comments

Comments
 (0)