aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/list_debug.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/list_debug.c b/lib/list_debug.c
index 1aae85cef92c..e80d27c97898 100644
--- a/lib/list_debug.c
+++ b/lib/list_debug.c
@@ -59,14 +59,17 @@ EXPORT_SYMBOL(list_add);
59 */ 59 */
60void list_del(struct list_head *entry) 60void list_del(struct list_head *entry)
61{ 61{
62 BUG_ON(entry->prev->next != entry);
63 BUG_ON(entry->next->prev != entry);
64
62 if (unlikely(entry->prev->next != entry)) { 65 if (unlikely(entry->prev->next != entry)) {
63 printk(KERN_ERR "list_del corruption. prev->next should be %p, but was %p\n", 66 printk(KERN_ERR "list_del corruption. prev->next should be %p, "
64 entry, entry->prev->next); 67 "but was %p\n", entry, entry->prev->next);
65 BUG(); 68 BUG();
66 } 69 }
67 if (unlikely(entry->next->prev != entry)) { 70 if (unlikely(entry->next->prev != entry)) {
68 printk(KERN_ERR "list_del corruption. next->prev should be %p, but was %p\n", 71 printk(KERN_ERR "list_del corruption. next->prev should be %p, "
69 entry, entry->next->prev); 72 "but was %p\n", entry, entry->next->prev);
70 BUG(); 73 BUG();
71 } 74 }
72 __list_del(entry->prev, entry->next); 75 __list_del(entry->prev, entry->next);
@@ -74,4 +77,3 @@ void list_del(struct list_head *entry)
74 entry->prev = LIST_POISON2; 77 entry->prev = LIST_POISON2;
75} 78}
76EXPORT_SYMBOL(list_del); 79EXPORT_SYMBOL(list_del);
77