Lines Matching refs:e
38 struct ubi_wl_entry *e, *victim = NULL; in find_anchor_wl_entry() local
41 ubi_rb_for_each_entry(p, e, root, u.rb) { in find_anchor_wl_entry()
42 if (e->pnum < UBI_FM_MAX_START && e->ec < max_ec) { in find_anchor_wl_entry()
43 victim = e; in find_anchor_wl_entry()
44 max_ec = e->ec; in find_anchor_wl_entry()
60 struct ubi_wl_entry *e; in return_unused_pool_pebs() local
63 e = ubi->lookuptbl[pool->pebs[i]]; in return_unused_pool_pebs()
64 wl_tree_add(e, &ubi->free); in return_unused_pool_pebs()
72 struct ubi_wl_entry *e; in anchor_pebs_avalible() local
74 ubi_rb_for_each_entry(p, e, root, u.rb) in anchor_pebs_avalible()
75 if (e->pnum < UBI_FM_MAX_START) in anchor_pebs_avalible()
92 struct ubi_wl_entry *e = NULL; in ubi_wl_get_fm_peb() local
98 e = find_anchor_wl_entry(&ubi->free); in ubi_wl_get_fm_peb()
100 e = find_mean_wl_entry(ubi, &ubi->free); in ubi_wl_get_fm_peb()
102 if (!e) in ubi_wl_get_fm_peb()
105 self_check_in_wl_tree(ubi, e, &ubi->free); in ubi_wl_get_fm_peb()
109 rb_erase(&e->u.rb, &ubi->free); in ubi_wl_get_fm_peb()
112 return e; in ubi_wl_get_fm_peb()
123 struct ubi_wl_entry *e; in ubi_refill_pools() local
140 e = wl_get_wle(ubi); in ubi_refill_pools()
141 if (!e) in ubi_refill_pools()
144 pool->pebs[pool->size] = e->pnum; in ubi_refill_pools()
154 e = find_wl_entry(ubi, &ubi->free, WL_FREE_MAX_DIFF); in ubi_refill_pools()
155 self_check_in_wl_tree(ubi, e, &ubi->free); in ubi_refill_pools()
156 rb_erase(&e->u.rb, &ubi->free); in ubi_refill_pools()
159 wl_pool->pebs[wl_pool->size] = e->pnum; in ubi_refill_pools()
325 struct ubi_wl_entry *e; in ubi_wl_put_fm_peb() local
334 e = ubi->lookuptbl[pnum]; in ubi_wl_put_fm_peb()
340 if (!e) { in ubi_wl_put_fm_peb()
341 e = fm_e; in ubi_wl_put_fm_peb()
342 ubi_assert(e->ec >= 0); in ubi_wl_put_fm_peb()
343 ubi->lookuptbl[pnum] = e; in ubi_wl_put_fm_peb()
349 return schedule_erase(ubi, e, vol_id, lnum, torture, true); in ubi_wl_put_fm_peb()
370 kfree(ubi->fm->e[i]); in ubi_fastmap_close()
384 struct ubi_wl_entry *e, in may_reserve_for_fm() argument
386 if (e && !ubi->fm_disabled && !ubi->fm && in may_reserve_for_fm()
387 e->pnum < UBI_FM_MAX_START) in may_reserve_for_fm()
388 e = rb_entry(rb_next(root->rb_node), in may_reserve_for_fm()
391 return e; in may_reserve_for_fm()