From: Al Viro Date: Sun, 6 Jul 2025 21:13:15 +0000 (-0400) Subject: do_move_mount(), vfs_move_mount(), do_move_mount_old(): constify struct path argument(s) X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=44b58cdaf99264a99e9f07e90b944ecdd8081c2a;p=users%2Fhch%2Fmisc.git do_move_mount(), vfs_move_mount(), do_move_mount_old(): constify struct path argument(s) Reviewed-by: Christian Brauner Signed-off-by: Al Viro --- diff --git a/fs/namespace.c b/fs/namespace.c index cf8dbf0741f0..c1c906cfcb94 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -3566,8 +3566,9 @@ static inline bool may_use_mount(struct mount *mnt) return check_anonymous_mnt(mnt); } -static int do_move_mount(struct path *old_path, - struct path *new_path, enum mnt_tree_flags_t flags) +static int do_move_mount(const struct path *old_path, + const struct path *new_path, + enum mnt_tree_flags_t flags) { struct mount *old = real_mount(old_path->mnt); int err; @@ -3639,7 +3640,7 @@ static int do_move_mount(struct path *old_path, return attach_recursive_mnt(old, &mp); } -static int do_move_mount_old(struct path *path, const char *old_name) +static int do_move_mount_old(const struct path *path, const char *old_name) { struct path old_path; int err; @@ -4469,7 +4470,8 @@ err_unlock: return ret; } -static inline int vfs_move_mount(struct path *from_path, struct path *to_path, +static inline int vfs_move_mount(const struct path *from_path, + const struct path *to_path, enum mnt_tree_flags_t mflags) { int ret;