diff options
| author | Al Viro <[email protected]> | 2025-07-03 02:30:32 +0000 |
|---|---|---|
| committer | Al Viro <[email protected]> | 2025-07-03 02:30:32 +0000 |
| commit | 2a8061ee5e41034eb14170ec4517b5583dbeff9f (patch) | |
| tree | 7cc2a67fdd029a42600c728451305b2d8fce6ad1 /rust/helpers/helpers.c | |
| parent | simple_recursive_removal(): saner interaction with fsnotify (diff) | |
| download | kernel-2a8061ee5e41034eb14170ec4517b5583dbeff9f.tar.gz kernel-2a8061ee5e41034eb14170ec4517b5583dbeff9f.zip | |
better lockdep annotations for simple_recursive_removal()
We want a class that nests outside of I_MUTEX_NORMAL (for the sake of
callbacks that might want to lock the victim) and inside I_MUTEX_PARENT
(so that a variant of that could be used with parent of the victim
held locked by the caller).
In reality, simple_recursive_removal()
* never holds two locks at once
* holds the lock on parent of dentry passed to callback
* is used only on the trees with fixed topology, so the depths
are not changing.
So the locking order is actually fine.
AFAICS, the best solution is to assign I_MUTEX_CHILD to the locks
grabbed by that thing.
Reported-by: [email protected]
Signed-off-by: Al Viro <[email protected]>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions
