diff options
author | NeilBrown <neil@brown.name> | 2025-09-22 14:29:48 +1000 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-09-23 12:37:35 +0200 |
commit | 17eb98d6b517b6e7faaebed496fd688dbb1771d9 (patch) | |
tree | cec1b68d5419b173ee8f3157b116133634854d34 /tools/testing/selftests/net/lib/py/utils.py | |
parent | 8f5ae30d69d7543eee0d70083daf4de8fe15d585 (diff) |
VFS/ovl: add lookup_one_positive_killable()
ovl wants a lookup which won't block on a fatal signal. It currently
uses down_write_killable() and then repeatedly calls to lookup_one()
The lock may not be needed if the name is already in the dcache and it
aids proposed future changes if the locking is kept internal to namei.c
So this patch adds lookup_one_positive_killable() which is like
lookup_one_positive() but will abort in the face of a fatal signal.
overlayfs is changed to use this.
Note that instead of always getting an exclusive lock, ovl now only gets
a shared lock, and only sometimes. The exclusive lock was never needed.
However down_read_killable() was only added in v4.15 but overlayfs started
using down_write_killable() here in v4.7.
Note that the linked list ->first_maybe_whiteout ->next_maybe_white is
local to the thread so there is no concurrency in that list which could
be threatened by removing the locking.
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/utils.py')
0 files changed, 0 insertions, 0 deletions