[CRIU] [PATCH v2 4/4] ns: Use rst_new_ns_id() in read_ns_with_hookups()
Kirill Tkhai
ktkhai at virtuozzo.com
Wed Mar 1 02:14:32 PST 2017
v2: New
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
criu/namespaces.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/criu/namespaces.c b/criu/namespaces.c
index 04ce9e325..a4c3063db 100644
--- a/criu/namespaces.c
+++ b/criu/namespaces.c
@@ -1876,12 +1876,7 @@ int read_ns_with_hookups(void)
else if (e->ns_cflag == CLONE_NEWNET)
desc = &net_ns_desc;
- if (rst_add_ns_id(e->id, -1, desc)) {
- pr_err("Can't add user ns\n");
- goto close;
- }
-
- ns = lookup_ns_by_id(e->id, desc);
+ ns = rst_new_ns_id(e->id, -1, desc, NS_OTHER);
if (!ns) {
pr_err("Can't find ns %d\n", e->id);
goto close;
More information about the CRIU
mailing list