diff options
-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); |