Commit 8bff4c7f authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

restore: consolidate restoring of a root task in one blob

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 703a322c
...@@ -697,13 +697,12 @@ static int restore_task_with_children(void *_arg) ...@@ -697,13 +697,12 @@ static int restore_task_with_children(void *_arg)
if (ret < 0) if (ret < 0)
exit(1); exit(1);
if (me->parent == NULL) /* Restore root task */
if (me->parent == NULL) {
if (collect_mount_info()) if (collect_mount_info())
exit(-1); exit(-1);
if (ca->clone_flags) { if (prepare_namespace(me->pid.virt, ca->clone_flags))
ret = prepare_namespace(me->pid.virt, ca->clone_flags);
if (ret)
exit(-1); exit(-1);
/* /*
...@@ -711,14 +710,12 @@ static int restore_task_with_children(void *_arg) ...@@ -711,14 +710,12 @@ static int restore_task_with_children(void *_arg)
* namespaces and do not care for the rest of the cases. * namespaces and do not care for the rest of the cases.
* Thus -- mount proc at custom location for any new namespace * Thus -- mount proc at custom location for any new namespace
*/ */
if (mount_proc()) if (mount_proc())
exit(-1); exit(-1);
}
if (me == root_item)
if (prepare_shared()) if (prepare_shared())
exit(-1); exit(-1);
}
/* /*
* The block mask will be restored in sigresturn. * The block mask will be restored in sigresturn.
......
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