提交 ae0d1469 编写于 作者: R Richard Weinberger 提交者: 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: NRichard Weinberger <richard@nod.at>
Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
上级 fe24c6e5
......@@ -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_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
* fat warning and fall back to scanning mode.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册