diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-12-06 13:32:36 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-03 22:57:13 -0500 |
commit | be08d6d260b6e7eb346162a1081cdf5f94fda569 (patch) | |
tree | fde11d2b2415a1a118e0da4a62c5bd8e635cb582 | |
parent | 0226f4923f6c9b40cfa1c1c1b19a6ac6b3924ead (diff) |
switch mnt_namespace ->root to struct mount
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-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 @@ | |||
4 | 4 | ||
5 | struct mnt_namespace { | 5 | struct mnt_namespace { |
6 | atomic_t count; | 6 | atomic_t count; |
7 | struct vfsmount * root; | 7 | struct mount * root; |
8 | struct list_head list; | 8 | struct list_head list; |
9 | wait_queue_head_t poll; | 9 | wait_queue_head_t poll; |
10 | int event; | 10 | 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, | |||
2197 | struct mnt_namespace *new_ns; | 2197 | struct mnt_namespace *new_ns; |
2198 | struct vfsmount *rootmnt = NULL, *pwdmnt = NULL; | 2198 | struct vfsmount *rootmnt = NULL, *pwdmnt = NULL; |
2199 | struct mount *p, *q; | 2199 | struct mount *p, *q; |
2200 | struct mount *old = real_mount(mnt_ns->root); | 2200 | struct mount *old = mnt_ns->root; |
2201 | struct mount *new; | 2201 | struct mount *new; |
2202 | 2202 | ||
2203 | new_ns = alloc_mnt_ns(); | 2203 | new_ns = alloc_mnt_ns(); |
@@ -2212,7 +2212,7 @@ static struct mnt_namespace *dup_mnt_ns(struct mnt_namespace *mnt_ns, | |||
2212 | kfree(new_ns); | 2212 | kfree(new_ns); |
2213 | return ERR_PTR(-ENOMEM); | 2213 | return ERR_PTR(-ENOMEM); |
2214 | } | 2214 | } |
2215 | new_ns->root = &new->mnt; | 2215 | new_ns->root = new; |
2216 | br_write_lock(vfsmount_lock); | 2216 | br_write_lock(vfsmount_lock); |
2217 | list_add_tail(&new_ns->list, &new->mnt_list); | 2217 | list_add_tail(&new_ns->list, &new->mnt_list); |
2218 | br_write_unlock(vfsmount_lock); | 2218 | br_write_unlock(vfsmount_lock); |
@@ -2282,7 +2282,7 @@ static struct mnt_namespace *create_mnt_ns(struct vfsmount *m) | |||
2282 | struct mount *mnt = real_mount(m); | 2282 | struct mount *mnt = real_mount(m); |
2283 | mnt->mnt_ns = new_ns; | 2283 | mnt->mnt_ns = new_ns; |
2284 | __mnt_make_longterm(mnt); | 2284 | __mnt_make_longterm(mnt); |
2285 | new_ns->root = m; | 2285 | new_ns->root = mnt; |
2286 | list_add(&new_ns->list, &mnt->mnt_list); | 2286 | list_add(&new_ns->list, &mnt->mnt_list); |
2287 | } else { | 2287 | } else { |
2288 | mntput(m); | 2288 | mntput(m); |
@@ -2512,8 +2512,8 @@ static void __init init_mount_tree(void) | |||
2512 | init_task.nsproxy->mnt_ns = ns; | 2512 | init_task.nsproxy->mnt_ns = ns; |
2513 | get_mnt_ns(ns); | 2513 | get_mnt_ns(ns); |
2514 | 2514 | ||
2515 | root.mnt = ns->root; | 2515 | root.mnt = mnt; |
2516 | root.dentry = ns->root->mnt_root; | 2516 | root.dentry = mnt->mnt_root; |
2517 | 2517 | ||
2518 | set_fs_pwd(current->fs, &root); | 2518 | set_fs_pwd(current->fs, &root); |
2519 | set_fs_root(current->fs, &root); | 2519 | set_fs_root(current->fs, &root); |
@@ -2560,7 +2560,7 @@ void put_mnt_ns(struct mnt_namespace *ns) | |||
2560 | return; | 2560 | return; |
2561 | down_write(&namespace_sem); | 2561 | down_write(&namespace_sem); |
2562 | br_write_lock(vfsmount_lock); | 2562 | br_write_lock(vfsmount_lock); |
2563 | umount_tree(real_mount(ns->root), 0, &umount_list); | 2563 | umount_tree(ns->root, 0, &umount_list); |
2564 | br_write_unlock(vfsmount_lock); | 2564 | br_write_unlock(vfsmount_lock); |
2565 | up_write(&namespace_sem); | 2565 | up_write(&namespace_sem); |
2566 | release_mounts(&umount_list); | 2566 | release_mounts(&umount_list); |