Commit ae0d1469 authored by Richard Weinberger's avatar Richard Weinberger Committed by Artem Bityutskiy

UBI: Add some asserts to ubi_attach_fastmap()

Add more paranioa asserts to make it easier to detect
implementation errors.
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent fe24c6e5
...@@ -826,6 +826,10 @@ static int ubi_attach_fastmap(struct ubi_device *ubi, ...@@ -826,6 +826,10 @@ static int ubi_attach_fastmap(struct ubi_device *ubi,
list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &free, u.list) list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &free, u.list)
list_move_tail(&tmp_aeb->u.list, &ai->free); list_move_tail(&tmp_aeb->u.list, &ai->free);
ubi_assert(list_empty(&used));
ubi_assert(list_empty(&eba_orphans));
ubi_assert(list_empty(&free));
/* /*
* If fastmap is leaking PEBs (must not happen), raise a * If fastmap is leaking PEBs (must not happen), raise a
* fat warning and fall back to scanning mode. * fat warning and fall back to scanning mode.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment