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

mount: Factor out mount tree build for NEWNS and non-NS cases

We anyway build the tree, in the NS case -- few calls later.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2013-12-12 16:19:48 +04:00
parent bd69c6173d
commit ae98ef6ae0
4 changed files with 13 additions and 27 deletions

View File

@@ -1260,14 +1260,7 @@ static int restore_task_with_children(void *_arg)
/* Restore root task */
if (current->parent == NULL) {
/*
* For ghost file path resolving on BTRFS we will need
* parsed mount tree, but IIF we're not restoring task
* with mount namespace cloned, in this case we don't parse
* mount tree early because we will be reading mount points
* from image later and generate new mount tree.
*/
if (collect_mount_info(getpid(), !(ca->clone_flags & CLONE_NEWNS)))
if (collect_mount_info(getpid()))
exit(1);
if (prepare_namespace(current, ca->clone_flags))