diff options
author | Richard Weinberger <richard@nod.at> | 2014-10-07 12:51:07 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2015-03-26 17:45:58 -0400 |
commit | a83832a7c8d023f446ec865926190951bd18a4b1 (patch) | |
tree | 4b00e237f31ef379fb49338668206640fd15029a | |
parent | 36a87e44f642966442fd0d23f2ec536851e00236 (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>
-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 600c4f9683e9..9858bfb22314 100644 --- a/drivers/mtd/ubi/fastmap.c +++ b/drivers/mtd/ubi/fastmap.c | |||
@@ -814,7 +814,9 @@ static int ubi_attach_fastmap(struct ubi_device *ubi, | |||
814 | list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &free, u.list) | 814 | list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &free, u.list) |
815 | list_move_tail(&tmp_aeb->u.list, &ai->free); | 815 | list_move_tail(&tmp_aeb->u.list, &ai->free); |
816 | 816 | ||
817 | ubi_assert(list_empty(&used)); | 817 | list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &used, u.list) |
818 | list_move_tail(&tmp_aeb->u.list, &ai->erase); | ||
819 | |||
818 | ubi_assert(list_empty(&eba_orphans)); | 820 | ubi_assert(list_empty(&eba_orphans)); |
819 | ubi_assert(list_empty(&free)); | 821 | ubi_assert(list_empty(&free)); |
820 | 822 | ||