Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 193819cf authored by Matthieu CASTET's avatar Matthieu CASTET Committed by Artem Bityutskiy
Browse files

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: default avatarMatthieu Castet <matthieu.castet@parrot.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent abb3e011
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -975,7 +975,7 @@ static int scan_peb(struct ubi_device *ubi, struct ubi_attach_info *ai,
			return err;
		goto adjust_mean_ec;
	case UBI_IO_FF:
		if (ec_err)
		if (ec_err || bitflips)
			err = add_to_list(ai, pnum, UBI_UNKNOWN,
					  UBI_UNKNOWN, ec, 1, &ai->erase);
		else