[CRIU] [PATCH 04/14] restore: Delete excess code in call_clone_fn()

Kirill Tkhai ktkhai at virtuozzo.com
Mon May 15 06:05:09 PDT 2017


We never call this function for root_item.
It's for dropping user ns, which may happen
with the rest of tasks only.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 criu/cr-restore.c |    6 ------
 1 file changed, 6 deletions(-)

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index 9a4732d77..ccee39ebf 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -1246,12 +1246,6 @@ static int call_clone_fn(void *arg)
 		close_pid_proc();
 
 	pid = clone_noasan(restore_task_with_children, ca->clone_flags | CLONE_PARENT | SIGCHLD, ca);
-
-	if (ca->item == root_item) {
-		ca->item->pid->real = pid;
-		pr_debug("PID: real %d virt %d\n", pid, vpid(ca->item));
-	}
-
 	return pid > 0 ? 0 : -1;
 }
 



More information about the CRIU mailing list