From Manfred Spraul A list_del debugging check. Signed-off-by: Andrew Morton --- include/linux/list.h | 4 ++++ 1 files changed, 4 insertions(+) diff -puN include/linux/list.h~list_del-debug include/linux/list.h --- devel/include/linux/list.h~list_del-debug 2006-04-14 23:44:35.000000000 -0700 +++ devel-akpm/include/linux/list.h 2006-04-14 23:44:35.000000000 -0700 @@ -6,7 +6,9 @@ #include #include #include +#include #include +#include /* * Simple doubly linked list implementation. @@ -155,6 +157,8 @@ static inline void __list_del(struct lis */ static inline void list_del(struct list_head *entry) { + BUG_ON(entry->prev->next != entry); + BUG_ON(entry->next->prev != entry); __list_del(entry->prev, entry->next); entry->next = LIST_POISON1; entry->prev = LIST_POISON2; _