mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-02 15:25:21 +00:00
ns: clean up dump_namespaces
Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
ee9258e80f
commit
4bd119ddf6
@@ -435,14 +435,10 @@ int dump_namespaces(struct pstree_item *item, unsigned int ns_flags)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ns = ns_ids;
|
for (ns = ns_ids; ns; ns = ns->next) {
|
||||||
|
|
||||||
while (ns) {
|
|
||||||
/* Skip current namespaces, which are in the list too */
|
/* Skip current namespaces, which are in the list too */
|
||||||
if (ns->pid == getpid()) {
|
if (ns->pid == getpid())
|
||||||
ns = ns->next;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
pid = fork();
|
pid = fork();
|
||||||
if (pid < 0) {
|
if (pid < 0) {
|
||||||
@@ -465,7 +461,6 @@ int dump_namespaces(struct pstree_item *item, unsigned int ns_flags)
|
|||||||
pr_err("Namespaces dumping finished with error %d\n", status);
|
pr_err("Namespaces dumping finished with error %d\n", status);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
ns = ns->next;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_info("Namespaces dump complete\n");
|
pr_info("Namespaces dump complete\n");
|
||||||
|
Reference in New Issue
Block a user