Commit 771e3321 authored by Andrei Vagin's avatar Andrei Vagin Committed by Pavel Emelyanov

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: 's avatarAndrei Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 7f4907fe
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment