diff options
author | Heiko Schocher <hs@denx.de> | 2014-06-24 09:25:18 +0200 |
---|---|---|
committer | Stefan Agner <stefan@agner.ch> | 2015-09-01 14:45:26 -0700 |
commit | 394ca0f4fd77f56b0be3dd19e9a331c4bc182b82 (patch) | |
tree | 1647844ebbd796d25ee07425907e345f8628ed46 /drivers | |
parent | b58a60eb42c0c90f7b61277ebcc4fcf2b8573fd2 (diff) |
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 <hs@denx.de>
Acked-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/ubi/fastmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c index c039dfeec71..e06366bc2ff 100644 --- a/drivers/mtd/ubi/fastmap.c +++ b/drivers/mtd/ubi/fastmap.c @@ -127,7 +127,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; |