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> |
---|
|
drivers/mtd/ubi/io.c |
---|
drivers/mtd/ubi/ubi.h |
---|
drivers/mtd/ubi/wl.c |
---|