[CRIU] [PATCH] mount: remove extra calls of mntns_collect_root()
Andrey Vagin
avagin at openvz.org
Tue Apr 22 03:38:38 PDT 2014
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: Andrey Vagin <avagin at openvz.org>
---
cr-restore.c | 3 ---
mount.c | 3 ---
2 files changed, 6 deletions(-)
diff --git a/cr-restore.c b/cr-restore.c
index 1ff0ffa..370e146 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -1255,9 +1255,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;
}
diff --git a/mount.c b/mount.c
index e98d254..bd902e6 100644
--- a/mount.c
+++ b/mount.c
@@ -803,9 +803,6 @@ struct mount_info *collect_mntinfo(struct ns_id *ns)
{
struct mount_info *pm, *p;
- 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);
--
1.8.5.3
More information about the CRIU
mailing list