mtd: ubi: mark PEBs as bad on erase failure
70542a9c65 converted UBI to use mtd_peb_torture(). It was assumed that a
block was marked as bad when it didn't pass the torture test. However,
not all possibly bad blocks went through the torture test, so it could
happen that a block that could not be erased was still kept as good
block. This patch fixes this and explicitly calls ubi_io_mark_bad() when
a block cannot be erased.

Fixes: 70542a9c65 ("mtd: ubi: Use mtd_peb_torture")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent eb135ab commit 4c216abb0cf5da6f896298fa875cd7bb80dc76b9
@Sascha Hauer Sascha Hauer authored on 15 Jul 2019
Showing 3 changed files
View
drivers/mtd/ubi/io.c
View
drivers/mtd/ubi/ubi.h
View
drivers/mtd/ubi/wl.c