diff options
author | Richard Weinberger <richard@nod.at> | 2014-10-07 18:51:07 +0200 |
---|---|---|
committer | Stefan Agner <stefan@agner.ch> | 2015-09-01 14:52:49 -0700 |
commit | 76640f37250593f6f262baf06789b7d56471a5cd (patch) | |
tree | 2714d2cc1cc343b8f7652a4ad066f8aaaa9e2bfe /drivers | |
parent | 2eb113ae3e27fc678bb310a7bad470a8cb72ff15 (diff) |
UBI: Fastmap: Remove bogus ubi_assert()
It is legal to have PEBs left in the used list.
This can happen if UBI copies a PEB and a powercut happens
between writing a new fastmap and adding this PEB into the EBA table.
In this case the old PEB will be used.
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/ubi/fastmap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c index 436261d780e..4c0ed4ca3b5 100644 --- a/drivers/mtd/ubi/fastmap.c +++ b/drivers/mtd/ubi/fastmap.c @@ -823,7 +823,9 @@ static int ubi_attach_fastmap(struct ubi_device *ubi, list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &freef, u.list) list_move_tail(&tmp_aeb->u.list, &ai->free); - ubi_assert(list_empty(&used)); + list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &used, u.list) + list_move_tail(&tmp_aeb->u.list, &ai->erase); + ubi_assert(list_empty(&eba_orphans)); ubi_assert(list_empty(&freef)); |