ext4: check the return value of ext4_xattr_inode_dec_ref()
[ Upstream commit56d0d0b928] Check the return value of ext4_xattr_inode_dec_ref(), which could return error code and need to be warned. Signed-off-by: Li Zhong <floridsleeves@gmail.com> Link: https://lore.kernel.org/r/20220917002816.3804400-1-floridsleeves@gmail.com Signed-off-by: Theodore Ts'o <tytso@mit.edu> Stable-dep-of:0a46ef2347("ext4: do not create EA inode under buffer lock") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
eea40d33bf
commit
d13e083800
+2
-1
@@ -1550,7 +1550,8 @@ static int ext4_xattr_inode_lookup_create(handle_t *handle, struct inode *inode,
|
||||
|
||||
err = ext4_xattr_inode_write(handle, ea_inode, value, value_len);
|
||||
if (err) {
|
||||
ext4_xattr_inode_dec_ref(handle, ea_inode);
|
||||
if (ext4_xattr_inode_dec_ref(handle, ea_inode))
|
||||
ext4_warning_inode(ea_inode, "cleanup dec ref error %d", err);
|
||||
iput(ea_inode);
|
||||
return err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user