summaryrefslogtreecommitdiff
path: root/fs/ext4/xattr.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2024-03-21 19:26:49 +0300
committerTheodore Ts'o <tytso@mit.edu>2024-05-03 07:02:08 +0300
commit4f3e6db3c3719952cfef89340290e0b7b03f7cbc (patch)
treebe41921e538120e61e97c12a02e6d09f4deb336a /fs/ext4/xattr.c
parent744a56389f7398f286231e062c2e63f0de01bcc6 (diff)
downloadlinux-4f3e6db3c3719952cfef89340290e0b7b03f7cbc.tar.xz
Revert "ext4: drop duplicate ea_inode handling in ext4_xattr_block_set()"
This reverts commit 7f48212678e91a057259b3e281701f7feb1ee397. We will need the special cleanup handling once we move allocation of EA inode outside of the buffer lock in the following patch. Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20240321162657.27420-1-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/xattr.c')
-rw-r--r--fs/ext4/xattr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index b67a176bfcf9..146690c10c73 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -2158,6 +2158,17 @@ getblk_failed:
ENTRY(header(s->base)+1));
if (error)
goto getblk_failed;
+ if (ea_inode) {
+ /* Drop the extra ref on ea_inode. */
+ error = ext4_xattr_inode_dec_ref(handle,
+ ea_inode);
+ if (error)
+ ext4_warning_inode(ea_inode,
+ "dec ref error=%d",
+ error);
+ iput(ea_inode);
+ ea_inode = NULL;
+ }
lock_buffer(new_bh);
error = ext4_journal_get_create_access(handle, sb,