[CRIU] [PATCH 06/10] restore: Rename CR_STATE_POST_RESTORE_NS -> _PREPARE_NAMESPACES

Pavel Emelyanov xemul at virtuozzo.com
Fri Apr 28 05:28:41 PDT 2017


This is wat root task does -- calls prepare_namespace().

Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
 criu/cr-restore.c       | 6 +++---
 criu/include/restorer.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index 63c8080..eacb371 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -128,7 +128,7 @@ static inline int stage_participants(int next_stage)
 	case CR_STATE_FAIL:
 		return 0;
 	case CR_STATE_ROOT_TASK:
-	case CR_STATE_POST_RESTORE_NS:
+	case CR_STATE_PREPARE_NAMESPACES:
 	case CR_STATE_RESTORE_SHARED:
 		return 1;
 	case CR_STATE_FORKING:
@@ -1556,7 +1556,7 @@ static int restore_task_with_children(void *_arg)
 		if (prepare_namespace(current, ca->clone_flags))
 			goto err;
 
-		if (restore_finish_stage(task_entries, CR_STATE_POST_RESTORE_NS) < 0)
+		if (restore_finish_stage(task_entries, CR_STATE_PREPARE_NAMESPACES) < 0)
 			goto err;
 
 		if (root_prepare_shared())
@@ -1939,7 +1939,7 @@ static int restore_root_task(struct pstree_item *init)
 	if (ret)
 		goto out_kill;
 
-	ret = restore_switch_stage(CR_STATE_POST_RESTORE_NS);
+	ret = restore_switch_stage(CR_STATE_PREPARE_NAMESPACES);
 	if (ret)
 		goto out_kill;
 
diff --git a/criu/include/restorer.h b/criu/include/restorer.h
index f74821f..4663339 100644
--- a/criu/include/restorer.h
+++ b/criu/include/restorer.h
@@ -210,7 +210,7 @@ enum {
 	 * Need to wait a mount namespace which
 	 * will be used to clean up remap files.
 	 */
-	CR_STATE_POST_RESTORE_NS,
+	CR_STATE_PREPARE_NAMESPACES,
 	CR_STATE_RESTORE_SHARED,
 	CR_STATE_FORKING,
 	CR_STATE_RESTORE,
-- 
2.1.4



More information about the CRIU mailing list