[CRIU] [PATCH v4 7/9] mount: fix try_remap_mount
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Mon Dec 11 19:07:24 MSK 2017
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 at virtuozzo.com>
---
criu/mount.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/criu/mount.c b/criu/mount.c
index 20c9af86e..bacb24222 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -2498,7 +2498,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;
}
--
2.14.3
More information about the CRIU
mailing list