From 94a08ec621fef3dff02f8d254a079652fe28698c Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sat, 1 Mar 2008 18:44:26 +0100 Subject: [PATCH 1/1] Add list_del_init() to list.h The file hashing will use it. Signed-off-by: Jens Axboe --- list.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/list.h b/list.h index cedbafaa..172fa482 100644 --- a/list.h +++ b/list.h @@ -95,6 +95,16 @@ static inline void list_del(struct list_head *entry) entry->prev = NULL; } +/** + * list_del_init - deletes entry from list and reinitialize it. + * @entry: the element to delete from the list. + */ +static inline void list_del_init(struct list_head *entry) +{ + __list_del(entry->prev, entry->next); + INIT_LIST_HEAD(entry); +} + /** * list_empty - tests whether a list is empty * @head: the list to test. -- 2.25.1