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

Submitted by Kirill Tkhai on May 15, 2017, 1:05 p.m.

Details

Message ID 149485350943.681.14210231801487272021.stgit@localhost.localdomain
State New
Series "Refactor pid_ns helpers creation"
Headers show

Commit Message

Kirill Tkhai May 15, 2017, 1:05 p.m.
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@virtuozzo.com>
---
 criu/cr-restore.c |    6 ------
 1 file changed, 6 deletions(-)

Patch hide | download patch | download mbox

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;
 }