Skip to content

Commit 4f3e6db

Browse files
jankaratytso
authored andcommitted
Revert "ext4: drop duplicate ea_inode handling in ext4_xattr_block_set()"
This reverts commit 7f48212. 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>
1 parent 744a563 commit 4f3e6db

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

fs/ext4/xattr.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2158,6 +2158,17 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode,
21582158
ENTRY(header(s->base)+1));
21592159
if (error)
21602160
goto getblk_failed;
2161+
if (ea_inode) {
2162+
/* Drop the extra ref on ea_inode. */
2163+
error = ext4_xattr_inode_dec_ref(handle,
2164+
ea_inode);
2165+
if (error)
2166+
ext4_warning_inode(ea_inode,
2167+
"dec ref error=%d",
2168+
error);
2169+
iput(ea_inode);
2170+
ea_inode = NULL;
2171+
}
21612172

21622173
lock_buffer(new_bh);
21632174
error = ext4_journal_get_create_access(handle, sb,

0 commit comments

Comments
 (0)