projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d141a8e
)
UBI: Fastmap: Switch to ro mode if invalidate_fastmap() fails
author
Richard Weinberger
<richard@nod.at>
Tue, 7 Oct 2014 19:45:19 +0000
(21:45 +0200)
committer
Richard Weinberger
<richard@nod.at>
Thu, 26 Mar 2015 21:45:59 +0000
(22:45 +0100)
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>
drivers/mtd/ubi/fastmap.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/mtd/ubi/fastmap.c
b/drivers/mtd/ubi/fastmap.c
index 8b95c48a002d651cf0c63ce89c499260268f638a..3d913f53fd06d016f15dd86663a5dfdd3f3f0ad3 100644
(file)
--- a/
drivers/mtd/ubi/fastmap.c
+++ b/
drivers/mtd/ubi/fastmap.c
@@
-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)
ret = 0;
}