[CRIU] [PATCH 2/2] mount: handle a case when parent and child mounts in the same directory

Andrey Vagin avagin at openvz.org
Wed May 4 19:22:01 PDT 2016


From: Andrew Vagin <avagin at virtuozzo.com>

Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
 criu/mount.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/criu/mount.c b/criu/mount.c
index a3c830f..6bfb152 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -634,6 +634,9 @@ static int validate_shared(struct mount_info *m)
 
 		ct_mpnt_rpath = ct->mountpoint + t_mpnt_l; /* path from t->mountpoint to ct->mountpoint */
 
+		if (ct_mpnt_rpath[0] == 0)
+			m_root_rpath++; /* skip the first "/" */
+
 		/*
 		 * Check whether ct can be is visible at m, i.e. the
 		 * ct's rpath starts (as path) with m's rpath.
-- 
2.7.4



More information about the CRIU mailing list