mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
UBI: Fastmap: Fall back to scanning mode after ECC error
If we encounter an uncorrectable ECC error while scanning for the fastmap UBI must not fail hard. Instead fall back to scanning mode. Reported-by: Alexander Block <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
This commit is contained in:
parent
56794c0a1a
commit
180a53577b
1 changed files with 1 additions and 1 deletions
|
|
@ -1419,7 +1419,7 @@ int ubi_attach(struct ubi_device *ubi, int force_scan)
|
|||
err = scan_all(ubi, ai, 0);
|
||||
else {
|
||||
err = scan_fast(ubi, &ai);
|
||||
if (err > 0) {
|
||||
if (err > 0 || mtd_is_eccerr(err)) {
|
||||
if (err != UBI_NO_FASTMAP) {
|
||||
destroy_ai(ai);
|
||||
ai = alloc_ai();
|
||||
|
|
|
|||
Loading…
Reference in a new issue