[CRIU] [PATCH cr 06/13] dump: move check_xids to dump_pstree

Andrey Vagin avagin at openvz.org
Tue Jun 19 07:53:10 EDT 2012


because in collect_pstree we don't know pid-s of processes inside pidns

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 cr-dump.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/cr-dump.c b/cr-dump.c
index 7136cd3..a12bc71 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -1409,9 +1409,6 @@ try_again:
 		free_pstree(root_item);
 	}
 
-	if (!ret)
-		ret = check_xids(root_item);
-
 	return ret;
 }
 
@@ -1426,6 +1423,10 @@ static int dump_pstree(struct pstree_item *root_item)
 	pr_info("Dumping pstree (pid: %d)\n", root_item->pid.real_pid);
 	pr_info("----------------------------------------\n");
 
+	ret = check_xids(root_item);
+	if (ret)
+		return -1;
+
 	pstree_fd = open_image(CR_FD_PSTREE, O_DUMP);
 	if (pstree_fd < 0)
 		return -1;
-- 
1.7.1



More information about the CRIU mailing list