diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-12-06 19:32:36 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-04 04:57:13 +0100 |
commit | be08d6d260b6e7eb346162a1081cdf5f94fda569 (patch) | |
tree | fde11d2b2415a1a118e0da4a62c5bd8e635cb582 /fs | |
parent | vfs: take /proc/*/mounts and friends to fs/proc_namespace.c (diff) | |
download | linux-be08d6d260b6e7eb346162a1081cdf5f94fda569.tar.xz linux-be08d6d260b6e7eb346162a1081cdf5f94fda569.zip |
switch mnt_namespace ->root to struct mount
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/mount.h | 2 | ||||
-rw-r--r-- | fs/namespace.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/fs/mount.h b/fs/mount.h index c6e99e03350a..0921b51e27e2 100644 --- a/fs/mount.h +++ b/fs/mount.h @@ -4,7 +4,7 @@ struct mnt_namespace { atomic_t count; - struct vfsmount * root; + struct mount * root; struct list_head list; wait_queue_head_t poll; int event; diff --git a/fs/namespace.c b/fs/namespace.c index 21a8261256dd..d4016f911ef9 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -2197,7 +2197,7 @@ static struct mnt_namespace *dup_mnt_ns(struct mnt_namespace *mnt_ns, struct mnt_namespace *new_ns; struct vfsmount *rootmnt = NULL, *pwdmnt = NULL; struct mount *p, *q; - struct mount *old = real_mount(mnt_ns->root); + struct mount *old = mnt_ns->root; struct mount *new; new_ns = alloc_mnt_ns(); @@ -2212,7 +2212,7 @@ static struct mnt_namespace *dup_mnt_ns(struct mnt_namespace *mnt_ns, kfree(new_ns); return ERR_PTR(-ENOMEM); } - new_ns->root = &new->mnt; + new_ns->root = new; br_write_lock(vfsmount_lock); list_add_tail(&new_ns->list, &new->mnt_list); br_write_unlock(vfsmount_lock); @@ -2282,7 +2282,7 @@ static struct mnt_namespace *create_mnt_ns(struct vfsmount *m) struct mount *mnt = real_mount(m); mnt->mnt_ns = new_ns; __mnt_make_longterm(mnt); - new_ns->root = m; + new_ns->root = mnt; list_add(&new_ns->list, &mnt->mnt_list); } else { mntput(m); @@ -2512,8 +2512,8 @@ static void __init init_mount_tree(void) init_task.nsproxy->mnt_ns = ns; get_mnt_ns(ns); - root.mnt = ns->root; - root.dentry = ns->root->mnt_root; + root.mnt = mnt; + root.dentry = mnt->mnt_root; set_fs_pwd(current->fs, &root); set_fs_root(current->fs, &root); @@ -2560,7 +2560,7 @@ void put_mnt_ns(struct mnt_namespace *ns) return; down_write(&namespace_sem); br_write_lock(vfsmount_lock); - umount_tree(real_mount(ns->root), 0, &umount_list); + umount_tree(ns->root, 0, &umount_list); br_write_unlock(vfsmount_lock); up_write(&namespace_sem); release_mounts(&umount_list); |