[v2,14/57] pid: Use last_level_pid() in restore_pgid()

Submitted by Kirill Tkhai on March 28, 2017, 3:36 p.m.

Details

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

Commit Message

Kirill Tkhai March 28, 2017, 3:36 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 d806391e..5795f645 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);
 }