Commit 20003300 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

mount: remove extra calls of mntns_collect_root()

Now mntns_collect_root() should be called each time when we need to get
a root of a specified namespace and we don't need to call it for
initializing the global variable.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 4ec63d53
......@@ -1251,9 +1251,6 @@ static int restore_task_with_children(void *_arg)
if (close_old_fds(current))
exit(1);
if (mntns_collect_root(getpid()) < 0)
exit(1);
if (root_prepare_shared())
goto err;
}
......
......@@ -828,9 +828,6 @@ struct mount_info *collect_mntinfo(struct ns_id *ns)
{
struct mount_info *pm;
if (mntns_collect_root(ns->pid) < 0)
return NULL;
pm = parse_mountinfo(ns->pid, ns);
if (!pm) {
pr_err("Can't parse %d's mountinfo\n", ns->pid);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment