hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/mtd/ubi/fastmap-wl.c
....@@ -146,13 +146,15 @@
146146 if (ubi->fm_anchor) {
147147 wl_tree_add(ubi->fm_anchor, &ubi->free);
148148 ubi->free_count++;
149
+ ubi->fm_anchor = NULL;
149150 }
150151
151
- /*
152
- * All available PEBs are in ubi->free, now is the time to get
153
- * the best anchor PEBs.
154
- */
155
- ubi->fm_anchor = ubi_wl_get_fm_peb(ubi, 1);
152
+ if (!ubi->fm_disabled)
153
+ /*
154
+ * All available PEBs are in ubi->free, now is the time to get
155
+ * the best anchor PEBs.
156
+ */
157
+ ubi->fm_anchor = ubi_wl_get_fm_peb(ubi, 1);
156158
157159 for (;;) {
158160 enough = 0;