UBI: bugfix: allocate mandatory EBs first
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 4 Dec 2007 19:36:12 +0000 (21:36 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Mon, 25 May 2009 14:08:17 +0000 (17:08 +0300)
commitf67133eb9e69209e87db660af39c1d9f5799378d
treed53c05e60b4665c9c8755255dc3cca5e48d41f85
parent09fcd36620a0eb956e5aeb0daaa3d5d6781dd80c
UBI: bugfix: allocate mandatory EBs first

First allocate the necessary eraseblocks, then the optional ones.
Otherwise it allocates all PEBs for bad EB handling, and fails
on then following EBA LEB allocation.

Reported-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/ubi/eba.c