[CRIU] [PATCH] ns: Use generate_ns_id instead of plain lookup in dump_one_ns_file

Cyrill Gorcunov gorcunov at openvz.org
Mon May 20 06:51:17 EDT 2013


generate_ns_id will check for attempt to dump nested namespace
and prompt a user accordingly.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 namespaces.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/namespaces.c b/namespaces.c
index 5928bd5..28f55d2 100644
--- a/namespaces.c
+++ b/namespaces.c
@@ -198,11 +198,9 @@ int dump_one_ns_file(int lfd, u32 id, const struct fd_parms *p)
 	struct fd_link *link = p->link;
 	unsigned int nsid;
 
-	nsid = lookup_ns_id(link->ns_kid, link->ns_d);
-	if (!nsid) {
-		pr_err("No NS ID with kid %u\n", link->ns_kid);
+	nsid = generate_ns_id(p->pid, link->ns_kid, link->ns_d);
+	if (!nsid)
 		return -1;
-	}
 
 	nfe.id		= id;
 	nfe.ns_id	= nsid;
-- 
1.8.1.4



More information about the CRIU mailing list