aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-07-18 12:23:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-07-18 12:23:34 -0400
commit033ead8230c2cf9cdc2d6e1148bfdf5674012a9c (patch)
treee730e257dda570c0994618511f6bc0d326fea173
parent847f56eb0e08fde16e721b76dcb2c70da0c730bf (diff)
parent44305ebde243a7cce2c592cc89afe5041d8bf884 (diff)
Merge tag 'upstream-3.16-rc6' of git://git.infradead.org/linux-ubifs
Pull UBI fixes from Artem Bityutskiy: "Two UBI fastmap-related fixes for v3.16: - fix UBI fastmap support which we broke in 3.16-rc1 by reversing the volumes RB-tree sorting criteria. - make sure that we scrub all PEBs where we see bit-flips - we were missing some of them when the fastmap feature was enabled" * tag 'upstream-3.16-rc6' of git://git.infradead.org/linux-ubifs: UBI: fastmap: do not miss bit-flips UBI: fix the volumes tree sorting criteria
-rw-r--r--drivers/mtd/ubi/fastmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index b04e7d059888..0431b46d9fd9 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -125,7 +125,7 @@ static struct ubi_ainf_volume *add_vol(struct ubi_attach_info *ai, int vol_id,
125 parent = *p; 125 parent = *p;
126 av = rb_entry(parent, struct ubi_ainf_volume, rb); 126 av = rb_entry(parent, struct ubi_ainf_volume, rb);
127 127
128 if (vol_id < av->vol_id) 128 if (vol_id > av->vol_id)
129 p = &(*p)->rb_left; 129 p = &(*p)->rb_left;
130 else 130 else
131 p = &(*p)->rb_right; 131 p = &(*p)->rb_right;
@@ -423,7 +423,7 @@ static int scan_pool(struct ubi_device *ubi, struct ubi_attach_info *ai,
423 pnum, err); 423 pnum, err);
424 ret = err > 0 ? UBI_BAD_FASTMAP : err; 424 ret = err > 0 ? UBI_BAD_FASTMAP : err;
425 goto out; 425 goto out;
426 } else if (ret == UBI_IO_BITFLIPS) 426 } else if (err == UBI_IO_BITFLIPS)
427 scrub = 1; 427 scrub = 1;
428 428
429 /* 429 /*