提交 2d93fb36 编写于 作者: R Richard Weinberger

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: NRichard Weinberger <richard@nod.at>
上级 d141a8ef
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册