mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 01:51:51 +00:00
mnt: Add comment about mntns to tasks assignment
Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Acked-by: Andrew Vagin <avagin@odin.com>
This commit is contained in:
parent
02edd8051e
commit
7263054c3a
9
mount.c
9
mount.c
@ -2017,6 +2017,15 @@ int restore_task_mnt_ns(struct pstree_item *current)
|
||||
unsigned int id = current->ids->mnt_ns_id;
|
||||
struct ns_id *nsid;
|
||||
|
||||
/*
|
||||
* Regardless of the namespace a task wants to
|
||||
* live in, by that point they all will live in
|
||||
* root's one (see prepare_pstree_kobj_ids() +
|
||||
* get_clone_mask()). So if the current task's
|
||||
* target namespace is the root's one -- it's
|
||||
* already there, otherwise it will have to do
|
||||
* setns().
|
||||
*/
|
||||
if (root_item->ids->mnt_ns_id == id)
|
||||
return 0;
|
||||
|
||||
|
7
pstree.c
7
pstree.c
@ -689,7 +689,12 @@ set_mask:
|
||||
* Mount namespaces are setns()-ed at
|
||||
* restore_task_mnt_ns() explicitly,
|
||||
* no need in creating it with its own
|
||||
* temporary namespace
|
||||
* temporary namespace.
|
||||
*
|
||||
* Root task is exceptional -- it will
|
||||
* be born in a fresh new mount namespace
|
||||
* which will be populated with all other
|
||||
* namespaces' entries.
|
||||
*/
|
||||
rsti(item)->clone_flags &= ~CLONE_NEWNS;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user