[CRIU] [PATCH 06/12] mounts: connect sub-root to the main root

Andrey Vagin avagin at openvz.org
Fri Jan 10 05:50:00 PST 2014


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 mount.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/mount.c b/mount.c
index 076afdc..739c02b 100644
--- a/mount.c
+++ b/mount.c
@@ -227,7 +227,11 @@ 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",
 					m->mnt_id, m->parent_mnt_id, m->mountpoint,
 					root ? "found" : "not found");
-			return NULL;
+			if (root && m->is_root) {
+				/* root of a sub mount namespace*/
+				p = root;
+			} else
+				return NULL;
 		}
 
 		m->parent = p;
-- 
1.8.3.1



More information about the CRIU mailing list