Richard Weinberger b91671bb23 UBI: Fix livelock in produce_free_peb()
The while loop in produce_free_peb() assumes that each work will produce a
free PEB. This is not true.
If ubi->works_count is 1 and the only scheduled work is the
wear_leveling_worker() produce_free_peb() can loop forever in case
nobody schedules an erase work.
Fix this issue by checking in the while loop whether work is scheduled.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-09-24 15:36:16 +03:00
..
2014-01-02 17:16:01 +02:00
2012-10-03 12:29:37 +03:00
2012-09-04 09:39:01 +03:00
2014-09-19 18:11:57 +03:00
2012-12-10 13:38:59 +02:00
2014-09-24 15:36:16 +03:00