diff options
author | NeilBrown <neil@brown.name> | 2025-09-22 14:29:51 +1000 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-09-23 12:37:35 +0200 |
commit | 76a53de6f7ff0641570364234fb4489f4d4fc8e9 (patch) | |
tree | 26f7c0c389ada340201ab498f35241077552328d /net/unix/af_unix.c | |
parent | d7fb2c410240348edee7867c29b60688175dcc11 (diff) |
VFS/audit: introduce kern_path_parent() for audit
audit_alloc_mark() and audit_get_nd() both need to perform a path
lookup getting the parent dentry (which must exist) and the final
target (following a LAST_NORM name) which sometimes doesn't need to
exist.
They don't need the parent to be locked, but use kern_path_locked() or
kern_path_locked_negative() anyway. This is somewhat misleading to the
casual reader.
This patch introduces a more targeted function, kern_path_parent(),
which returns not holding locks. On success the "path" will
be set to the parent, which must be found, and the return value is the
dentry of the target, which might be negative.
This will clear the way to rename kern_path_locked() which is
otherwise only used to prepare for removing something.
It also allows us to remove kern_path_locked_negative(), which is
transformed into the new kern_path_parent().
Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions