projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c16f39d
)
ubi: fastmap: Only produce the initial anchor PEB when fastmap is used
author
Hou Tao
<houtao1@huawei.com>
Mon, 10 Feb 2020 13:26:35 +0000
(21:26 +0800)
committer
Richard Weinberger
<richard@nod.at>
Mon, 30 Mar 2020 21:02:36 +0000
(23:02 +0200)
Don't produce the initial anchor PEB when ubi device is read-only
or fastmap is disabled, else the resulting PEB will be unusable
to any volume.
Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/ubi/wl.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/ubi/wl.c
b/drivers/mtd/ubi/wl.c
index 837d690a8c60d345c9d53c878658d45236c2f1d7..5146cce5fe32115d46c3e4735777b22df991489a 100644
(file)
--- a/
drivers/mtd/ubi/wl.c
+++ b/
drivers/mtd/ubi/wl.c
@@
-1875,7
+1875,8
@@
int ubi_wl_init(struct ubi_device *ubi, struct ubi_attach_info *ai)
goto out_free;
#ifdef CONFIG_MTD_UBI_FASTMAP
- ubi_ensure_anchor_pebs(ubi);
+ if (!ubi->ro_mode && !ubi->fm_disabled)
+ ubi_ensure_anchor_pebs(ubi);
#endif
return 0;