aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorAl Viro <[email protected]>2024-05-09 20:32:51 +0000
committerAl Viro <[email protected]>2025-07-03 02:36:27 +0000
commit9fd45235fdd2c2615a03c86ebe5a88b050dc5680 (patch)
tree0d4e783064cca8a790fb8b868a5fa39a779adebb /rust/helpers/helpers.c
parentbetter lockdep annotations for simple_recursive_removal() (diff)
downloadkernel-9fd45235fdd2c2615a03c86ebe5a88b050dc5680.tar.gz
kernel-9fd45235fdd2c2615a03c86ebe5a88b050dc5680.zip
add locked_recursive_removal()
simple_recursive_removal() assumes that parent is not locked and locks it when it finally gets to removing the victim itself. Usually that's what we want, but there are places where the parent is *already* locked and we need it to stay that way. In those cases simple_recursive_removal() would, of course, deadlock, so we have to play racy games with unlocking/relocking the parent around the call or open-code the entire thing. A better solution is to provide a variant that expects to be called with the parent already locked by the caller. Parent should be locked with I_MUTEX_PARENT, to avoid false positives from lockdep. Reviewed-by: Christian Brauner <[email protected]> Signed-off-by: Al Viro <[email protected]>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions