UBI: Fastmap: Make ubi_refill_pools() fair
authorRichard Weinberger <richard@nod.at>
Mon, 10 Nov 2014 14:39:17 +0000 (15:39 +0100)
committerRichard Weinberger <richard@nod.at>
Thu, 26 Mar 2015 21:17:47 +0000 (22:17 +0100)
commit6830356466a57db21c7bc31bf3be4e61189e145b
tree881282f4d06ed98f9aed6bbfaa4b3dbc32b588c8
parent691a870563b4fe9e014a309477fb8f9fe41b36bb
UBI: Fastmap: Make ubi_refill_pools() fair

Currently ubi_refill_pools() first fills the first and then
the second one.
If only very few free PEBs are available the second pool can get
zero PEBs.
Change ubi_refill_pools() to distribute free PEBs fair between
all pools.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Guido Martínez <guido@vanguardiasur.com.ar>
drivers/mtd/ubi/wl.c