summaryrefslogtreecommitdiff
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2025-08-24 19:34:37 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2025-09-15 21:26:44 -0400
commitb42ffcd5069d5cfb777b8982a1c55c7e2f1d3998 (patch)
tree4857fe5e55bcc28a7f3f88837f03fa5246c921db /fs/namespace.c
parent1f6df5847454dee8608f78ee0df7352472cb2447 (diff)
collect_paths(): constify the return value
callers have no business modifying the paths they get Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 346e577073bb..cf8dbf0741f0 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2300,7 +2300,7 @@ static inline bool extend_array(struct path **res, struct path **to_free,
return p;
}
-struct path *collect_paths(const struct path *path,
+const struct path *collect_paths(const struct path *path,
struct path *prealloc, unsigned count)
{
struct mount *root = real_mount(path->mnt);
@@ -2334,7 +2334,7 @@ struct path *collect_paths(const struct path *path,
return res;
}
-void drop_collected_paths(const struct path *paths, struct path *prealloc)
+void drop_collected_paths(const struct path *paths, const struct path *prealloc)
{
for (const struct path *p = paths; p->mnt; p++)
path_put(p);