Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b22edc5 authored by Trond Myklebust's avatar Trond Myklebust Committed by Al Viro
Browse files

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



Eliminates some duplicated code...

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 654f562c
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -2222,16 +2222,9 @@ static void __init init_mount_tree(void)
	mnt = do_kern_mount("rootfs", 0, "rootfs", NULL);
	if (IS_ERR(mnt))
		panic("Can't create rootfs");
	ns = kmalloc(sizeof(*ns), GFP_KERNEL);
	if (!ns)
	ns = create_mnt_ns(mnt);
	if (IS_ERR(ns))
		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;
	get_mnt_ns(ns);