X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=list.h;h=172fa482ee8a3426ba53c4335d3d6a2df0c0692a;hb=d0c70934dde93a8ee260a84c1bf69ff24484d486;hp=cedbafaae022de9267bcfd02296410a0b42c3465;hpb=5f350952eff89948bfbf1eb6ac4d3d08a9109581;p=fio.git 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.