2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

mnt: Move nsmask checking into prepare_mnt_ns

Helper for simpler next patch.

Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2014-04-22 20:38:54 +04:00
parent 908915889d
commit 05c02ddcf9
2 changed files with 9 additions and 2 deletions

View File

@@ -526,8 +526,12 @@ int prepare_namespace(struct pstree_item *item, unsigned long clone_flags)
id = ns_per_id ? item->ids->ipc_ns_id : pid;
if ((clone_flags & CLONE_NEWIPC) && prepare_ipc_ns(id))
return -1;
id = ns_per_id ? item->ids->mnt_ns_id : pid;
if ((clone_flags & CLONE_NEWNS) && prepare_mnt_ns())
/*
* This one is special -- there can be several mount
* namespaces and prepare_mnt_ns handles them itself.
*/
if (prepare_mnt_ns())
return -1;
return 0;