mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +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;
|
||||
}
|
||||
|
||||
ns = ns_ids;
|
||||
|
||||
while (ns) {
|
||||
for (ns = ns_ids; ns; ns = ns->next) {
|
||||
/* Skip current namespaces, which are in the list too */
|
||||
if (ns->pid == getpid()) {
|
||||
ns = ns->next;
|
||||
if (ns->pid == getpid())
|
||||
continue;
|
||||
}
|
||||
|
||||
pid = fork();
|
||||
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);
|
||||
return -1;
|
||||
}
|
||||
ns = ns->next;
|
||||
}
|
||||
|
||||
pr_info("Namespaces dump complete\n");
|
||||
|
Reference in New Issue
Block a user