ext4: set lockdep subclass for the ea_inode in ext4_xattr_inode_cache_find()
authorTheodore Ts'o <tytso@mit.edu>
Wed, 24 May 2023 03:49:49 +0000 (23:49 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 30 May 2023 19:33:50 +0000 (15:33 -0400)
commitb928dfdcb27d8fa59917b794cfba53052a2f050f
tree294ac1565274e7eceeb4647b2def3411f9ed08d4
parentb3e6bcb94590dea45396b9481e47b809b1be4afa
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: 33d201e0277b ("ext4: fix lockdep warning about recursive inode locking")
Cc: stable@kernel.org
Reported-by: syzbot+d4b971e744b1f5439336@syzkaller.appspotmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Link: https://lore.kernel.org/r/20230524034951.779531-3-tytso@mit.edu
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/xattr.c