2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

mount: apply superblock flags to nested ns roots

Before this change we didn't apply sb-flags if we mount the root mount of
non-root mntns. There is no point in it, if we got to do_new_mount this root
mount is not external bind, so we won't change sb-flags on host if we change it
for this mount. So we just loose sb-flags on some regular container mount for
no reason. Fix it.

Cherry-picked from Virtuozzo criu:
https://src.openvz.org/projects/OVZ/repos/criu/commits/e7ffe4c60

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
Pavel Tikhomirov
2020-05-27 13:43:49 +03:00
committed by Andrei Vagin
parent 77f67973f2
commit 2a3d2bc284

View File

@@ -2213,7 +2213,7 @@ static int do_new_mount(struct mount_info *mi)
goto out;
}
if (!mi->is_ns_root && remount_ro) {
if (remount_ro) {
int fd;
fd = open(mi->mountpoint, O_PATH);