[CRIU] [PATCH] dump: Don't loose dump_namespaces error
Cyrill Gorcunov
gorcunov at gmail.com
Mon Jun 4 20:17:57 MSK 2018
In case if dump_namespaces failed we may have
ret shadowed and erroneously report checkpoint
success.
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
criu/cr-dump.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/criu/cr-dump.c b/criu/cr-dump.c
index fb308196594a..2103de480ba9 100644
--- a/criu/cr-dump.c
+++ b/criu/cr-dump.c
@@ -1988,9 +1988,11 @@ int cr_dump_tasks(pid_t pid)
if (ret)
goto err;
- if (root_ns_mask)
- if (dump_namespaces(root_item, root_ns_mask) < 0)
+ if (root_ns_mask) {
+ ret = dump_namespaces(root_item, root_ns_mask);
+ if (ret)
goto err;
+ }
ret = dump_cgroups();
if (ret)
--
2.14.4
More information about the CRIU
mailing list