We have to switch to ro mode to guarantee that upon next UBI attach all data is consistent. Signed-off-by: Richard Weinberger <richard@nod.at>
@@ -1466,8 +1466,10 @@ err:
ret = 0;
if (old_fm) {
ret = invalidate_fastmap(ubi, old_fm);
- if (ret < 0)
+ if (ret < 0) {
ubi_err(ubi, "Unable to invalidiate current fastmap!");
+ ubi_ro_mode(ubi);
+ }
else if (ret)
}