aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/attach.c
diff options
context:
space:
mode:
authorMatthieu CASTET <matthieu.castet@parrot.com>2012-08-22 10:03:46 -0400
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-09-04 02:39:01 -0400
commit193819cf2e6e395b1e1be2d36785dc5563a6edca (patch)
tree51a3cc303a5f34c8fc63ef102da0bde66edfc89c /drivers/mtd/ubi/attach.c
parentabb3e01103eb4e2ea5c15e6fedbc74e08bd4cc2b (diff)
UBI: erase free PEB with bitflip in EC header
Without this patch, these PEB are not scrubbed until we put data in them. Bitflip can accumulate latter and we can loose the EC header (but VID header should be intact and allow to recover data). Signed-off-by: Matthieu Castet <matthieu.castet@parrot.com> Cc: stable@vger.kernel.org Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/ubi/attach.c')
-rw-r--r--drivers/mtd/ubi/attach.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
index bd27cbbb4066..68d4d1f76d1e 100644
--- a/drivers/mtd/ubi/attach.c
+++ b/drivers/mtd/ubi/attach.c
@@ -975,7 +975,7 @@ static int scan_peb(struct ubi_device *ubi, struct ubi_attach_info *ai,
975 return err; 975 return err;
976 goto adjust_mean_ec; 976 goto adjust_mean_ec;
977 case UBI_IO_FF: 977 case UBI_IO_FF:
978 if (ec_err) 978 if (ec_err || bitflips)
979 err = add_to_list(ai, pnum, UBI_UNKNOWN, 979 err = add_to_list(ai, pnum, UBI_UNKNOWN,
980 UBI_UNKNOWN, ec, 1, &ai->erase); 980 UBI_UNKNOWN, ec, 1, &ai->erase);
981 else 981 else