Skip to content
Commit 84d6c730 authored by Pavel Tikhomirov's avatar Pavel Tikhomirov Committed by Andrei Vagin
Browse files

mount: fix mnt_resort_siblings to work as described



We should add new entry _before_ first entry with less depth to sort in
descending order.

e.g: entries in list have depths [7,5,3], adding new entry m with depth
4 we would break list_for_each_entry loop on p with depth 3, before
patch we would get [7,5,3,4] after list_add, which is wrong.

Also we can relax "<=" check to "<" to avoid unnecessary reordering.

Signed-off-by: default avatarPavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: default avatarAndrei Vagin <avagin@virtuozzo.com>
parent dd104ddb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment