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

mount: fix try_remap_mount

Remaps in mnt_remap_list should follow same descending order which was
setup in mnt_resort_siblings(), so don't reorder them.

For instance if we have sibling mounts with mountpoints:
1) /dir1/dir2/dir3
2) /dir1/dir2
3) /dir1
Here (2) is sibling-overmount for (1). Mount (3) is sibling-overmount
for both (1) and (2). So when we move overmounts back in
fixup_remap_mounts() we should first move (2) and only then (3).

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Pavel Tikhomirov
2017-12-11 19:07:24 +03:00
committed by Andrei Vagin
parent f083987f27
commit b82c935c27

View File

@@ -2508,7 +2508,7 @@ static int try_remap_mount(struct mount_info *m)
return -1;
r->mi = m;
list_add(&r->node, &mnt_remap_list);
list_add_tail(&r->node, &mnt_remap_list);
return 0;
}