Skip to content

Commit 589ff87

Browse files
author
Al Viro
committed
Switch collect_mounts() to struct path
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent bab77eb commit 589ff87

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎fs/namespace.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,11 +1253,11 @@ struct vfsmount *copy_tree(struct vfsmount *mnt, struct dentry *dentry,
12531253
return NULL;
12541254
}
12551255

1256-
struct vfsmount *collect_mounts(struct vfsmount *mnt, struct dentry *dentry)
1256+
struct vfsmount *collect_mounts(struct path *path)
12571257
{
12581258
struct vfsmount *tree;
12591259
down_write(&namespace_sem);
1260-
tree = copy_tree(mnt, dentry, CL_COPY_ALL | CL_PRIVATE);
1260+
tree = copy_tree(path->mnt, path->dentry, CL_COPY_ALL | CL_PRIVATE);
12611261
up_write(&namespace_sem);
12621262
return tree;
12631263
}

‎include/linux/fs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1800,7 +1800,7 @@ extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data);
18001800
extern int may_umount_tree(struct vfsmount *);
18011801
extern int may_umount(struct vfsmount *);
18021802
extern long do_mount(char *, char *, char *, unsigned long, void *);
1803-
extern struct vfsmount *collect_mounts(struct vfsmount *, struct dentry *);
1803+
extern struct vfsmount *collect_mounts(struct path *);
18041804
extern void drop_collected_mounts(struct vfsmount *);
18051805

18061806
extern int vfs_statfs(struct dentry *, struct kstatfs *);

‎kernel/audit_tree.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ void audit_trim_trees(void)
568568
if (err)
569569
goto skip_it;
570570

571-
root_mnt = collect_mounts(path.mnt, path.dentry);
571+
root_mnt = collect_mounts(&path);
572572
path_put(&path);
573573
if (!root_mnt)
574574
goto skip_it;
@@ -660,7 +660,7 @@ int audit_add_tree_rule(struct audit_krule *rule)
660660
err = kern_path(tree->pathname, 0, &path);
661661
if (err)
662662
goto Err;
663-
mnt = collect_mounts(path.mnt, path.dentry);
663+
mnt = collect_mounts(&path);
664664
path_put(&path);
665665
if (!mnt) {
666666
err = -ENOMEM;
@@ -720,7 +720,7 @@ int audit_tag_tree(char *old, char *new)
720720
err = kern_path(new, 0, &path);
721721
if (err)
722722
return err;
723-
tagged = collect_mounts(path.mnt, path.dentry);
723+
tagged = collect_mounts(&path);
724724
path_put(&path);
725725
if (!tagged)
726726
return -ENOMEM;

0 commit comments

Comments
 (0)