ubi: Deal with interrupted erasures in WL
authorRichard Weinberger <richard@nod.at>
Wed, 24 Aug 2016 12:36:13 +0000 (14:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Oct 2016 07:01:28 +0000 (03:01 -0400)
commit7f2e25fa12421e6d3c4d192e4115673d8493f58d
tree72c7538b785fc2ce2c1a75075d3d3a64aab06e17
parentb57af607da42ca00914fecfe4bdf3d163e333093
ubi: Deal with interrupted erasures in WL

commit 2365418879e9abf12ea9def7f9f3caf0dfa7ffb0 upstream.

When Fastmap is used we can face here an -EBADMSG
since Fastmap cannot know about unmaps.
If the erasure was interrupted the PEB may show ECC
errors and UBI would go to ro-mode as it assumes
that the PEB was check during attach time, which is
not the case with Fastmap.

Fixes: dbb7d2a88d ("UBI: Add fastmap core")
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/ubi/wl.c