diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2024-05-09 16:32:51 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2025-07-02 22:36:27 -0400 |
commit | 9fd45235fdd2c2615a03c86ebe5a88b050dc5680 (patch) | |
tree | 0d4e783064cca8a790fb8b868a5fa39a779adebb /lib/crypto/mpi/mpiutil.c | |
parent | 2a8061ee5e41034eb14170ec4517b5583dbeff9f (diff) |
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 <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'lib/crypto/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions