]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
VFS: rename kern_path_locked() and related functions.
authorNeilBrown <neil@brown.name>
Mon, 22 Sep 2025 04:29:52 +0000 (14:29 +1000)
committerChristian Brauner <brauner@kernel.org>
Tue, 23 Sep 2025 10:37:36 +0000 (12:37 +0200)
commit3d18f80ce181ba27f37d0ec1c550b22acb01dd49
tree09964e812e5b4716ae9b8cbf75d2f548d61bae9e
parent76a53de6f7ff0641570364234fb4489f4d4fc8e9
VFS: rename kern_path_locked() and related functions.

kern_path_locked() is now only used to prepare for removing an object
from the filesystem (and that is the only credible reason for wanting a
positive locked dentry).  Thus it corresponds to kern_path_create() and
so should have a corresponding name.

Unfortunately the name "kern_path_create" is somewhat misleading as it
doesn't actually create anything.  The recently added
simple_start_creating() provides a better pattern I believe.  The
"start" can be matched with "end" to bracket the creating or removing.

So this patch changes names:

 kern_path_locked -> start_removing_path
 kern_path_create -> start_creating_path
 user_path_create -> start_creating_user_path
 user_path_locked_at -> start_removing_user_path_at
 done_path_create -> end_creating_path

and also introduces end_removing_path() which is identical to
end_creating_path().

__start_removing_path (which was __kern_path_locked) is enhanced to
call mnt_want_write() for consistency with the start_creating_path().

Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Documentation/filesystems/porting.rst
arch/powerpc/platforms/cell/spufs/syscalls.c
drivers/base/devtmpfs.c
fs/bcachefs/fs-ioctl.c
fs/init.c
fs/namei.c
fs/ocfs2/refcounttree.c
fs/smb/server/vfs.c
include/linux/namei.h
kernel/bpf/inode.c
net/unix/af_unix.c