[v1,14/55] pid: Use last_level_pid() in restore_pgid()

Submitted by Kirill Tkhai on March 24, 2017, 2:57 p.m.

Details

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

Commit Message

Kirill Tkhai March 24, 2017, 2:57 p.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 4e9f89ef..a1c20fc3 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);
 }