mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
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>
This commit is contained in:
parent
36a87e44f6
commit
a83832a7c8
1 changed files with 3 additions and 1 deletions
|
@ -814,7 +814,9 @@ static int ubi_attach_fastmap(struct ubi_device *ubi,
|
|||
list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &free, 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(&free));
|
||||
|
||||
|
|
Loading…
Reference in a new issue