Commit a9ec5829 authored by Pavel Tikhomirov's avatar Pavel Tikhomirov Committed by Andrei Vagin

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: 's avatarPavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 84d6c730
...@@ -2507,7 +2507,7 @@ static int try_remap_mount(struct mount_info *m) ...@@ -2507,7 +2507,7 @@ static int try_remap_mount(struct mount_info *m)
return -1; return -1;
r->mi = m; r->mi = m;
list_add(&r->node, &mnt_remap_list); list_add_tail(&r->node, &mnt_remap_list);
return 0; return 0;
} }
......
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