Commit 589ff870 authored by Al Viro's avatar Al Viro
Browse files

Switch collect_mounts() to struct path


Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent bab77ebf
...@@ -1253,11 +1253,11 @@ Enomem: ...@@ -1253,11 +1253,11 @@ Enomem:
return NULL; return NULL;
} }
struct vfsmount *collect_mounts(struct vfsmount *mnt, struct dentry *dentry) struct vfsmount *collect_mounts(struct path *path)
{ {
struct vfsmount *tree; struct vfsmount *tree;
down_write(&namespace_sem); down_write(&namespace_sem);
tree = copy_tree(mnt, dentry, CL_COPY_ALL | CL_PRIVATE); tree = copy_tree(path->mnt, path->dentry, CL_COPY_ALL | CL_PRIVATE);
up_write(&namespace_sem); up_write(&namespace_sem);
return tree; return tree;
} }
......
...@@ -1800,7 +1800,7 @@ extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data); ...@@ -1800,7 +1800,7 @@ extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data);
extern int may_umount_tree(struct vfsmount *); extern int may_umount_tree(struct vfsmount *);
extern int may_umount(struct vfsmount *); extern int may_umount(struct vfsmount *);
extern long do_mount(char *, char *, char *, unsigned long, void *); extern long do_mount(char *, char *, char *, unsigned long, void *);
extern struct vfsmount *collect_mounts(struct vfsmount *, struct dentry *); extern struct vfsmount *collect_mounts(struct path *);
extern void drop_collected_mounts(struct vfsmount *); extern void drop_collected_mounts(struct vfsmount *);
extern int vfs_statfs(struct dentry *, struct kstatfs *); extern int vfs_statfs(struct dentry *, struct kstatfs *);
......
...@@ -568,7 +568,7 @@ void audit_trim_trees(void) ...@@ -568,7 +568,7 @@ void audit_trim_trees(void)
if (err) if (err)
goto skip_it; goto skip_it;
root_mnt = collect_mounts(path.mnt, path.dentry); root_mnt = collect_mounts(&path);
path_put(&path); path_put(&path);
if (!root_mnt) if (!root_mnt)
goto skip_it; goto skip_it;
...@@ -660,7 +660,7 @@ int audit_add_tree_rule(struct audit_krule *rule) ...@@ -660,7 +660,7 @@ int audit_add_tree_rule(struct audit_krule *rule)
err = kern_path(tree->pathname, 0, &path); err = kern_path(tree->pathname, 0, &path);
if (err) if (err)
goto Err; goto Err;
mnt = collect_mounts(path.mnt, path.dentry); mnt = collect_mounts(&path);
path_put(&path); path_put(&path);
if (!mnt) { if (!mnt) {
err = -ENOMEM; err = -ENOMEM;
...@@ -720,7 +720,7 @@ int audit_tag_tree(char *old, char *new) ...@@ -720,7 +720,7 @@ int audit_tag_tree(char *old, char *new)
err = kern_path(new, 0, &path); err = kern_path(new, 0, &path);
if (err) if (err)
return err; return err;
tagged = collect_mounts(path.mnt, path.dentry); tagged = collect_mounts(&path);
path_put(&path); path_put(&path);
if (!tagged) if (!tagged)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment