mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-02 15:25:21 +00:00
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: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
4ec63d53e1
commit
20003300d8
@@ -1251,9 +1251,6 @@ static int restore_task_with_children(void *_arg)
|
|||||||
if (close_old_fds(current))
|
if (close_old_fds(current))
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
if (mntns_collect_root(getpid()) < 0)
|
|
||||||
exit(1);
|
|
||||||
|
|
||||||
if (root_prepare_shared())
|
if (root_prepare_shared())
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
3
mount.c
3
mount.c
@@ -828,9 +828,6 @@ struct mount_info *collect_mntinfo(struct ns_id *ns)
|
|||||||
{
|
{
|
||||||
struct mount_info *pm;
|
struct mount_info *pm;
|
||||||
|
|
||||||
if (mntns_collect_root(ns->pid) < 0)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
pm = parse_mountinfo(ns->pid, ns);
|
pm = parse_mountinfo(ns->pid, ns);
|
||||||
if (!pm) {
|
if (!pm) {
|
||||||
pr_err("Can't parse %d's mountinfo\n", ns->pid);
|
pr_err("Can't parse %d's mountinfo\n", ns->pid);
|
||||||
|
Reference in New Issue
Block a user