[CRIU] [PATCH 2/6] mnt: restore shared mounts in a correct shared group

Andrei Vagin avagin at openvz.org
Mon Sep 12 21:19:44 PDT 2016


From: Andrei Vagin <avagin at virtuozzo.com>

Currently when we have a shared group, we set a source mount for all
of them and then we need to update a source mount when we mount a first
mount from a shared group, because a shared id can be only inherited.

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

diff --git a/criu/mount.c b/criu/mount.c
index 797edd7..1121ce0 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -2181,7 +2181,9 @@ static int propagate_siblings(struct mount_info *mi)
 	 * to inherite shared group or master id
 	 */
 	list_for_each_entry(t, &mi->mnt_share, mnt_share) {
-		if (t->mounted || t->bind)
+		if (t->mounted)
+			continue;
+		if (t->bind && t->bind->shared_id == t->shared_id)
 			continue;
 		pr_debug("\t\tBind share %s\n", t->mountpoint);
 		t->bind = mi;
-- 
2.7.4



More information about the CRIU mailing list