aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/fastmap-wl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ubi/fastmap-wl.c')
-rw-r--r--drivers/mtd/ubi/fastmap-wl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/fastmap-wl.c b/drivers/mtd/ubi/fastmap-wl.c
index 30d3999dddba..4f0bd6b4422a 100644
--- a/drivers/mtd/ubi/fastmap-wl.c
+++ b/drivers/mtd/ubi/fastmap-wl.c
@@ -262,6 +262,8 @@ static struct ubi_wl_entry *get_peb_for_wl(struct ubi_device *ubi)
262 struct ubi_fm_pool *pool = &ubi->fm_wl_pool; 262 struct ubi_fm_pool *pool = &ubi->fm_wl_pool;
263 int pnum; 263 int pnum;
264 264
265 ubi_assert(rwsem_is_locked(&ubi->fm_eba_sem));
266
265 if (pool->used == pool->size) { 267 if (pool->used == pool->size) {
266 /* We cannot update the fastmap here because this 268 /* We cannot update the fastmap here because this
267 * function is called in atomic context. 269 * function is called in atomic context.
@@ -303,7 +305,7 @@ int ubi_ensure_anchor_pebs(struct ubi_device *ubi)
303 305
304 wrk->anchor = 1; 306 wrk->anchor = 1;
305 wrk->func = &wear_leveling_worker; 307 wrk->func = &wear_leveling_worker;
306 schedule_ubi_work(ubi, wrk); 308 __schedule_ubi_work(ubi, wrk);
307 return 0; 309 return 0;
308} 310}
309 311
@@ -344,7 +346,7 @@ int ubi_wl_put_fm_peb(struct ubi_device *ubi, struct ubi_wl_entry *fm_e,
344 spin_unlock(&ubi->wl_lock); 346 spin_unlock(&ubi->wl_lock);
345 347
346 vol_id = lnum ? UBI_FM_DATA_VOLUME_ID : UBI_FM_SB_VOLUME_ID; 348 vol_id = lnum ? UBI_FM_DATA_VOLUME_ID : UBI_FM_SB_VOLUME_ID;
347 return schedule_erase(ubi, e, vol_id, lnum, torture); 349 return schedule_erase(ubi, e, vol_id, lnum, torture, true);
348} 350}
349 351
350/** 352/**