Commit 1edfe53b authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

mounts: Connect sub-root to the main root as children

Each sub-namespace is restored as sub-tree of the root mntns, so
the parent of sub-mntns root is the root of the root mntns.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 84c48e62
...@@ -232,6 +232,15 @@ static struct mount_info *mnt_build_ids_tree(struct mount_info *list) ...@@ -232,6 +232,15 @@ static struct mount_info *mnt_build_ids_tree(struct mount_info *list)
pr_err("Mountpoint %d w/o parent %d found @%s (root %s)\n", pr_err("Mountpoint %d w/o parent %d found @%s (root %s)\n",
m->mnt_id, m->parent_mnt_id, m->mountpoint, m->mnt_id, m->parent_mnt_id, m->mountpoint,
root ? "found" : "not found"); root ? "found" : "not found");
if (root && m->is_ns_root) {
/*
* A root of a sub mount namespace is
* mounted in a temporary directory in the
* root mount namespace, so its parent is
* the main root.
*/
p = root;
} else
return NULL; return NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment