It removes a PEB from the free rb-tree.
ubi->lookuptbl[pnum] does not matter at this time.
For practical matters, you are correct.
Design wise, it is bit inconsistent and confusing.
On one hand, you claim above that 'ubi->lookuptbl' holds the WL entries
known to WL subsystem - that is, lookuptbl is a data structure used and
maintained by the WL subsystem.
OTOH, when a PEB is removed from hands of WL (by a ubi_wl_get_fm_peb
call), you keep its WL entry assigned in ubi->lookuptbl.
I'll rethink this, see if there's a potential trouble here.
However 'ubi_wl_put_fm_peb' creates a 'ubi_wl_entry' if not found inCurrently fastmap "fixes" ubi->lookuptbl on demand. Is this a problem?
the lookuptbl.
I guess not.
The only problem, as previously noted, is the failure to create a new
'ubi_wl_entry' when the PEB needs to be returned to WL subsystem.