提交 ab8e92ef 编写于 作者: A Andrew Morton 提交者: Linus Torvalds

[PATCH] list_del-debug fix

These two BUG_ON()s are redundant and undesired: we're checking for this
condition further on in the function, only better.

Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 1bdfd554
......@@ -59,9 +59,6 @@ EXPORT_SYMBOL(list_add);
*/
void list_del(struct list_head *entry)
{
BUG_ON(entry->prev->next != entry);
BUG_ON(entry->next->prev != entry);
if (unlikely(entry->prev->next != entry)) {
printk(KERN_ERR "list_del corruption. prev->next should be %p, "
"but was %p\n", entry, entry->prev->next);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册