Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5da7525 authored by Sebastian Siewior's avatar Sebastian Siewior Committed by Nikhilesh Reddy
Browse files

mtd: ubi: wl: avoid erasing a PEB which is empty



wear_leveling_worker() currently unconditionally puts a PEB on erase in
the error case even it just been taken from the free_list and never
used.
In case the PEB was never used it can be put back on the free list
saving a precious erase cycle.

v1…v2:
	- to_leb_clean -> dst_leb_clean
	- use the nested option for ensure_wear_leveling()
	- do_sync_erase() can't go -ENOMEM so we can just go into
	  RO-mode now.

CRs-Fixed: 975289
Change-Id: I9955366673af13e6cfd3da3523dba4857b2b4ea2
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Git-commit: 34b89df90374b631692132640c6b3dbef52f808d
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarNikhilesh Reddy <reddyn@codeaurora.org>
parent 84d51d45
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment