Commit 4bd119dd authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

ns: clean up dump_namespaces

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ee9258e8
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment