2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

mount: fix broken remounted_rw check

Expression (x && REMOUNTED_RW) is always same as just (x).

It should've been (x & REMOUNTED_RW) to check if mount is marked as
temporary remounted writable and requires to be switched back.

By fixing this check we eliminate excess readonly remounts.

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

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
Pavel Tikhomirov
2020-07-08 09:57:33 +03:00
committed by Andrei Vagin
parent 7182470454
commit 0c41c1187b

View File

@@ -4113,7 +4113,7 @@ static int __remount_readonly_mounts(struct ns_id *ns)
if (ns && mi->nsid != ns)
continue;
if (!(*mi->remounted_rw && REMOUNTED_RW))
if (!(*mi->remounted_rw & REMOUNTED_RW))
continue;
/*