[CRIU] [PATCH] restore: don't restore cg props if task restore fails

Tycho Andersen tycho.andersen at canonical.com
Wed Aug 27 15:57:49 PDT 2014


Once the task restore has failed, we can just abort, no need to restore the cg
props.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 cr-restore.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cr-restore.c b/cr-restore.c
index 7bb5cef..cefa78e 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -1821,11 +1821,11 @@ int cr_restore_tasks(void)
 	if (criu_signals_setup() < 0)
 		goto err;
 
-	ret = restore_root_task(root_item);
-
-	if (prepare_cgroup_properties() < 0)
+	if (restore_root_task(root_item) < 0)
 		goto err;
 
+	ret = prepare_cgroup_properties();
+
 err:
 	fini_cgroup();
 	cr_plugin_fini();
-- 
1.9.1



More information about the CRIU mailing list