From b367eecca6a0e5d8e32627f79bd7d4afdac1aca1 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 13 Jun 2009 12:28:57 +0200 Subject: [PATCH] --- yaml --- r: 150941 b: refs/heads/master c: d219dce76c64f2c883dad0537fa09a56d5ff0a10 h: refs/heads/master i: 150939: d26f821115fd98d425898a950834f0b3c439922e v: v3 --- [refs] | 2 +- trunk/include/linux/list_nulls.h | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 1ee69c830c0e..d1d28dcb6f7c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9858a3ae1d4b390fbaa9c30b83cb66d861b76294 +refs/heads/master: d219dce76c64f2c883dad0537fa09a56d5ff0a10 diff --git a/trunk/include/linux/list_nulls.h b/trunk/include/linux/list_nulls.h index 93150ecf3ea4..5d10ae364b5e 100644 --- a/trunk/include/linux/list_nulls.h +++ b/trunk/include/linux/list_nulls.h @@ -56,6 +56,18 @@ static inline int hlist_nulls_empty(const struct hlist_nulls_head *h) return is_a_nulls(h->first); } +static inline void hlist_nulls_add_head(struct hlist_nulls_node *n, + struct hlist_nulls_head *h) +{ + struct hlist_nulls_node *first = h->first; + + n->next = first; + n->pprev = &h->first; + h->first = n; + if (!is_a_nulls(first)) + first->pprev = &n->next; +} + static inline void __hlist_nulls_del(struct hlist_nulls_node *n) { struct hlist_nulls_node *next = n->next; @@ -65,6 +77,12 @@ static inline void __hlist_nulls_del(struct hlist_nulls_node *n) next->pprev = pprev; } +static inline void hlist_nulls_del(struct hlist_nulls_node *n) +{ + __hlist_nulls_del(n); + n->pprev = LIST_POISON2; +} + /** * hlist_nulls_for_each_entry - iterate over list of given type * @tpos: the type * to use as a loop cursor.