mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
UBI: fix the volumes tree sorting criteria
Commig "604b592 UBI: fix rb_tree node comparison in add_map" broke fastmap backward compatibility and older fastmap images cannot be mounted anymore. The reason is that it changes the volumes RB-tree sorting criteria. This patch fixes the problem. Artem: re-write the commit message Signed-off-by: Heiko Schocher <[email protected]> Acked-by: Richard Weinberger <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]>
This commit is contained in:
1 parent
a497c3ba1d
commit
e9110361a9
1 file changed
+1
-1
@@ -125,7 +125,7 @@ static struct ubi_ainf_volume *add_vol(struct ubi_attach_info *ai, int vol_id,
|
||||
parent = *p;
|
||||
av = rb_entry(parent, struct ubi_ainf_volume, rb);
|
||||
|
||||
if (vol_id < av->vol_id)
|
||||
if (vol_id > av->vol_id)
|
||||
p = &(*p)->rb_left;
|
||||
else
|
||||
p = &(*p)->rb_right;
|
||||
|
||||
Reference in new issue
Block a user