mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 08:36:43 +07:00
UBI: Fastmap: Switch to ro mode if invalidate_fastmap() fails
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>
This commit is contained in:
parent
d141a8ef21
commit
2d93fb3632
@ -1466,8 +1466,10 @@ int ubi_update_fastmap(struct ubi_device *ubi)
|
||||
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)
|
||||
ret = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user