[v3,11/55] pid: Use last_level_pid() in restore_pgid()

Submitted by Kirill Tkhai on April 10, 2017, 8:16 a.m.

Details

Message ID 149181221133.17342.2102404798562795056.stgit@localhost.localdomain
State New
Series "Nested pid namespaces support"
Headers show

Commit Message

Kirill Tkhai April 10, 2017, 8:16 a.m.
This patch is cleanup, which just makes comparation
on values on the one pid level. It has no functional
payload, because the new patches turn off pgid set
if for multi-level pids cases, till it will be implemented.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 criu/cr-restore.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index 38f24f351..516dfe2a7 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -1232,7 +1232,7 @@  static void restore_pgid(void)
 	if (my_pgid == pgid)
 		return;
 
-	if (my_pgid != vpid(current)) {
+	if (my_pgid != last_level_pid(current->pid)) {
 		struct pstree_item *leader;
 
 		/*
@@ -1254,7 +1254,7 @@  static void restore_pgid(void)
 		exit(1);
 	}
 
-	if (my_pgid == vpid(current))
+	if (my_pgid == last_level_pid(current->pid))
 		futex_set_and_wake(&rsti(current)->pgrp_set, 1);
 }