summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2025-08-24 14:13:52 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2025-09-15 21:26:44 -0400
commita8be822f61934b493bc1c8ed98aa3326b7d176df (patch)
tree7e95d05336f6e35a12dbb1c36c9ac2681aa31b0a
parent17d44b452c4f0135b1b18f99e2d4fc607de59af4 (diff)
do_{loopback,change_type,remount,reconfigure_mnt}(): constify struct path argument
Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/namespace.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 4fafc6f8f942..dbaa80bfc89a 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2908,7 +2908,7 @@ static int flags_to_propagation_type(int ms_flags)
/*
* recursively change the type of the mountpoint.
*/
-static int do_change_type(struct path *path, int ms_flags)
+static int do_change_type(const struct path *path, int ms_flags)
{
struct mount *m;
struct mount *mnt = real_mount(path->mnt);
@@ -3028,8 +3028,8 @@ static struct mount *__do_loopback(struct path *old_path, int recurse)
/*
* do loopback mount.
*/
-static int do_loopback(struct path *path, const char *old_name,
- int recurse)
+static int do_loopback(const struct path *path, const char *old_name,
+ int recurse)
{
struct path old_path __free(path_put) = {};
struct mount *mnt = NULL;
@@ -3259,7 +3259,7 @@ static void mnt_warn_timestamp_expiry(const struct path *mountpoint,
* superblock it refers to. This is triggered by specifying MS_REMOUNT|MS_BIND
* to mount(2).
*/
-static int do_reconfigure_mnt(struct path *path, unsigned int mnt_flags)
+static int do_reconfigure_mnt(const struct path *path, unsigned int mnt_flags)
{
struct super_block *sb = path->mnt->mnt_sb;
struct mount *mnt = real_mount(path->mnt);
@@ -3296,7 +3296,7 @@ static int do_reconfigure_mnt(struct path *path, unsigned int mnt_flags)
* If you've mounted a non-root directory somewhere and want to do remount
* on it - tough luck.
*/
-static int do_remount(struct path *path, int ms_flags, int sb_flags,
+static int do_remount(const struct path *path, int ms_flags, int sb_flags,
int mnt_flags, void *data)
{
int err;