diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-04-14 00:05:28 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-14 00:05:28 -0700 |
commit | f5572855ec492334d8c3ec0e0e86c31865d5cf07 (patch) | |
tree | b33ff667553a0592d621a02852964afc926ee0f3 /include/linux/skbuff.h | |
parent | 7de6c033367ab86f39c7723392caf73325cbf286 (diff) | |
download | lwn-f5572855ec492334d8c3ec0e0e86c31865d5cf07.tar.gz lwn-f5572855ec492334d8c3ec0e0e86c31865d5cf07.zip |
[SKB]: __skb_queue_tail = __skb_insert before
This expresses __skb_queue_tail() in terms of __skb_insert(),
using __skb_insert_before() as auxiliary function.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 83c851846829..11fd9f2c4093 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -700,6 +700,13 @@ static inline void __skb_queue_after(struct sk_buff_head *list, extern void skb_append(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list); +static inline void __skb_queue_before(struct sk_buff_head *list, + struct sk_buff *next, + struct sk_buff *newsk) +{ + __skb_insert(newsk, next->prev, next, list); +} + /** * __skb_queue_head - queue a buffer at the list head * @list: list to use @@ -731,14 +738,7 @@ extern void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk); static inline void __skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk) { - struct sk_buff *prev, *next; - - list->qlen++; - next = (struct sk_buff *)list; - prev = next->prev; - newsk->next = next; - newsk->prev = prev; - next->prev = prev->next = newsk; + __skb_queue_before(list, (struct sk_buff *)list, newsk); } /* |