diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-06-23 17:29:49 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-24 08:15:24 -0400 |
commit | 3b22edc5730b87d360ee7dd7143397ba09b73a47 (patch) | |
tree | 0ee6b90aa3be7878ee73363f167c0a9b47b89f5e /fs/namespace.c | |
parent | 654f562c526cf9dfb8d453f687341fe0777ee454 (diff) |
VFS: Switch init_mount_tree() to use the new create_mnt_ns() helper
Eliminates some duplicated code...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index a7bea8c8bd46..4a86b8595164 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -2222,16 +2222,9 @@ static void __init init_mount_tree(void) | |||
2222 | mnt = do_kern_mount("rootfs", 0, "rootfs", NULL); | 2222 | mnt = do_kern_mount("rootfs", 0, "rootfs", NULL); |
2223 | if (IS_ERR(mnt)) | 2223 | if (IS_ERR(mnt)) |
2224 | panic("Can't create rootfs"); | 2224 | panic("Can't create rootfs"); |
2225 | ns = kmalloc(sizeof(*ns), GFP_KERNEL); | 2225 | ns = create_mnt_ns(mnt); |
2226 | if (!ns) | 2226 | if (IS_ERR(ns)) |
2227 | panic("Can't allocate initial namespace"); | 2227 | panic("Can't allocate initial namespace"); |
2228 | atomic_set(&ns->count, 1); | ||
2229 | INIT_LIST_HEAD(&ns->list); | ||
2230 | init_waitqueue_head(&ns->poll); | ||
2231 | ns->event = 0; | ||
2232 | list_add(&mnt->mnt_list, &ns->list); | ||
2233 | ns->root = mnt; | ||
2234 | mnt->mnt_ns = ns; | ||
2235 | 2228 | ||
2236 | init_task.nsproxy->mnt_ns = ns; | 2229 | init_task.nsproxy->mnt_ns = ns; |
2237 | get_mnt_ns(ns); | 2230 | get_mnt_ns(ns); |