提交 3b22edc5 编写于 作者: T Trond Myklebust 提交者: Al Viro

VFS: Switch init_mount_tree() to use the new create_mnt_ns() helper

Eliminates some duplicated code...
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 654f562c
...@@ -2222,16 +2222,9 @@ static void __init init_mount_tree(void) ...@@ -2222,16 +2222,9 @@ static void __init init_mount_tree(void)
mnt = do_kern_mount("rootfs", 0, "rootfs", NULL); mnt = do_kern_mount("rootfs", 0, "rootfs", NULL);
if (IS_ERR(mnt)) if (IS_ERR(mnt))
panic("Can't create rootfs"); panic("Can't create rootfs");
ns = kmalloc(sizeof(*ns), GFP_KERNEL); ns = create_mnt_ns(mnt);
if (!ns) if (IS_ERR(ns))
panic("Can't allocate initial namespace"); panic("Can't allocate initial namespace");
atomic_set(&ns->count, 1);
INIT_LIST_HEAD(&ns->list);
init_waitqueue_head(&ns->poll);
ns->event = 0;
list_add(&mnt->mnt_list, &ns->list);
ns->root = mnt;
mnt->mnt_ns = ns;
init_task.nsproxy->mnt_ns = ns; init_task.nsproxy->mnt_ns = ns;
get_mnt_ns(ns); get_mnt_ns(ns);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册