debugfs: annotate debugfs handlers vs. removal with lockdep
authorJohannes Berg <johannes.berg@intel.com>
Fri, 24 Nov 2023 16:25:25 +0000 (17:25 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 27 Nov 2023 10:24:50 +0000 (11:24 +0100)
commitf4acfcd4deb158b96595250cc332901b282d15b0
treebc06b650955d9bbc41bd889f8f497ecb92e1416b
parent0ed04a1847a10297595ac24dc7d46b35fb35f90a
debugfs: annotate debugfs handlers vs. removal with lockdep

When you take a lock in a debugfs handler but also try
to remove the debugfs file under that lock, things can
deadlock since the removal has to wait for all users
to finish.

Add lockdep annotations in debugfs_file_get()/_put()
to catch such issues.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
fs/debugfs/file.c
fs/debugfs/inode.c
fs/debugfs/internal.h