summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Zhong <floridsleeves@gmail.com>2022-09-16 17:28:16 -0700
committerTheodore Ts'o <tytso@mit.edu>2022-12-01 10:46:54 -0500
commit56d0d0b9289dae041becc7ee6bd966a00dd610e0 (patch)
treeea1c17f9a09a49930d0a8179cf5719ca799c9fa1
parent71df9683827a17fb6279fcc2e52efdc7062a03b9 (diff)
downloadlwn-56d0d0b9289dae041becc7ee6bd966a00dd610e0.tar.gz
lwn-56d0d0b9289dae041becc7ee6bd966a00dd610e0.zip
ext4: check the return value of ext4_xattr_inode_dec_ref()
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>
-rw-r--r--fs/ext4/xattr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 36d6ba7190b6..718ef3987f94 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -1540,7 +1540,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;
}