Skip to content

Commit b928dfd

Browse files
committed
ext4: set lockdep subclass for the ea_inode in ext4_xattr_inode_cache_find()
If the ea_inode has been pushed out of the inode cache while there is still a reference in the mb_cache, the lockdep subclass will not be set on the inode, which can lead to some lockdep false positives. Fixes: 33d201e ("ext4: fix lockdep warning about recursive inode locking") Cc: [email protected] Reported-by: [email protected] Signed-off-by: Theodore Ts'o <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent b3e6bcb commit b928dfd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/ext4/xattr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,6 +1539,7 @@ ext4_xattr_inode_cache_find(struct inode *inode, const void *value,
15391539
EXT4_IGET_EA_INODE);
15401540
if (IS_ERR(ea_inode))
15411541
goto next_entry;
1542+
ext4_xattr_inode_set_class(ea_inode);
15421543
if (i_size_read(ea_inode) == value_len &&
15431544
!ext4_xattr_inode_read(ea_inode, ea_data, value_len) &&
15441545
!ext4_xattr_inode_verify_hashes(ea_inode, NULL, ea_data,

0 commit comments

Comments
 (0)