diff options
| author | NeilBrown <neil@brown.name> | 2026-09-05 07:48:14 +1000 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-09-25 16:27:19 +0200 |
| commit | cc47a1ba1983116ee7a720a79197eb5299ae5d31 (patch) | |
| tree | 3dde1e43f515b82026ee3541894660bda8af49d3 /include/linux | |
| parent | 33d76519f0ccb55b975a399f2a9a9c8933fa89d7 (diff) | |
VFS: Add LOOKUP_SHARED flag.
Some ->lookup handlers will need to drop and retake the parent lock, so
they can safely use d_alloc_parallel().
->lookup can be called with the parent lock either exclusive or shared.
A new flag, LOOKUP_SHARED, tells ->lookup how the parent is locked.
This is rather ugly, but will be gone soon after we move
d_alloc_parallel() out of the directory lock as ->lookup() will *always*
called with a shared lock on the parent.
Signed-off-by: NeilBrown <neil@brown.name>
Link: https://patch.msgid.link/20260904215142.1060510-6-neilb@ownmail.net
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/namei.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/namei.h b/include/linux/namei.h index 86d657b24fc6..65f0f5712885 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h @@ -32,8 +32,9 @@ enum { MAX_NESTED_LINKS = 8 }; #define LOOKUP_CREATE BIT(17) /* ... in object creation */ #define LOOKUP_EXCL BIT(18) /* ... in target must not exist */ #define LOOKUP_RENAME_TARGET BIT(19) /* ... in destination of rename() */ +#define LOOKUP_SHARED BIT(20) /* Parent lock is held shared */ -/* 4 spare bits for intent */ +/* 3 spare bits for intent */ /* Scoping flags for lookup. */ #define LOOKUP_NO_SYMLINKS BIT(24) /* No symlink crossing. */ |
