mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
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>
This commit is contained in:
parent
1f6df58474
commit
b42ffcd506
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -104,8 +104,8 @@ extern int may_umount_tree(struct vfsmount *);
|
|||
extern int may_umount(struct vfsmount *);
|
||||
int do_mount(const char *, const char __user *,
|
||||
const char *, unsigned long, void *);
|
||||
extern struct path *collect_paths(const struct path *, struct path *, unsigned);
|
||||
extern void drop_collected_paths(const struct path *, struct path *);
|
||||
extern const struct path *collect_paths(const struct path *, struct path *, unsigned);
|
||||
extern void drop_collected_paths(const struct path *, const struct path *);
|
||||
extern void kern_unmount_array(struct vfsmount *mnt[], unsigned int num);
|
||||
|
||||
extern int cifs_root_data(char **dev, char **opts);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user