[CRIU] [PATCH 1/2] mount: do nothing if a root mount isn't slave

Andrey Vagin avagin at openvz.org
Fri Dec 18 00:44:30 PST 2015


From: Andrew Vagin <avagin at virtuozzo.com>

Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
 mount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mount.c b/mount.c
index 0c3192a..d26ba07 100644
--- a/mount.c
+++ b/mount.c
@@ -926,7 +926,7 @@ static int resolve_shared_mounts(struct mount_info *info)
 		bool need_share, need_master;
 
 		/* the root master_id can be ignored, because it's already created */
-		if (root_master_id == m->master_id)
+		if (root_master_id && root_master_id == m->master_id)
 			m->master_id = -1;
 
 		need_share = m->shared_id && list_empty(&m->mnt_share);
-- 
2.4.3



More information about the CRIU mailing list