From: Jens Axboe Date: Sat, 1 Mar 2008 17:44:26 +0000 (+0100) Subject: Add list_del_init() to list.h X-Git-Tag: fio-1.20-rc1~16 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=94a08ec621fef3dff02f8d254a079652fe28698c Add list_del_init() to list.h The file hashing will use it. Signed-off-by: Jens Axboe --- 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.