From 771e33214c62c1696e3863b06f7cb7e36bd69eb9 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Wed, 26 Oct 2016 23:55:21 +0300 Subject: [PATCH] mount: don't apply superblock flags for external mounts Part-of: Fix a few issues to dump/restore Docker containers with userns travis-ci: success for Fix a few issues to dump/restore Docker containers with userns Signed-off-by: Andrei Vagin Signed-off-by: Pavel Emelyanov --- criu/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/criu/mount.c b/criu/mount.c index 30e778800..f3d5673d3 100644 --- a/criu/mount.c +++ b/criu/mount.c @@ -1725,7 +1725,7 @@ static int do_new_mount(struct mount_info *mi) goto out; } - if (remount_ro && mount(NULL, mi->mountpoint, tp->name, + if (!mi->is_ns_root && !mi->external && remount_ro) { MS_REMOUNT | MS_RDONLY, NULL)) { pr_perror("Unable to apply mount options"); return -1;