From e0ce5317655d1aafc04027d137e93a5f3a1a9232 Mon Sep 17 00:00:00 2001 From: Gerrit Renker Date: Mon, 14 Apr 2008 00:04:12 -0700 Subject: [PATCH] --- yaml --- r: 90671 b: refs/heads/master c: f525c06d12b72cddb085df7f6f348c3c5a39b3ce h: refs/heads/master i: 90669: 07cc78c32bf1dc260fc0af6ffdc88a4174ceee43 90667: ceed111aa794a2ec8b57560488f9e287c59fd982 90663: e64cfadd6fbed1a01a7aec6b5165234b06886d3a 90655: ca2d9809ad75c4d7ba343cbc78f40e8676e21cb5 v: v3 --- [refs] | 2 +- trunk/include/linux/skbuff.h | 47 ++++++++++++------------------------ 2 files changed, 17 insertions(+), 32 deletions(-) diff --git a/[refs] b/[refs] index 3e0beb265aa8..9bcfe25083f4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0912ea38de61378c5c753aef78c12e2f95854313 +refs/heads/master: f525c06d12b72cddb085df7f6f348c3c5a39b3ce diff --git a/trunk/include/linux/skbuff.h b/trunk/include/linux/skbuff.h index e517701c25ba..c2116200580a 100644 --- a/trunk/include/linux/skbuff.h +++ b/trunk/include/linux/skbuff.h @@ -734,35 +734,6 @@ static inline void __skb_queue_tail(struct sk_buff_head *list, next->prev = prev->next = newsk; } - -/** - * __skb_dequeue - remove from the head of the queue - * @list: list to dequeue from - * - * Remove the head of the list. This function does not take any locks - * so must be used with appropriate locks held only. The head item is - * returned or %NULL if the list is empty. - */ -extern struct sk_buff *skb_dequeue(struct sk_buff_head *list); -static inline struct sk_buff *__skb_dequeue(struct sk_buff_head *list) -{ - struct sk_buff *next, *prev, *result; - - prev = (struct sk_buff *) list; - next = prev->next; - result = NULL; - if (next != prev) { - result = next; - next = next->next; - list->qlen--; - next->prev = prev; - prev->next = next; - result->next = result->prev = NULL; - } - return result; -} - - /* * Insert a packet on a list. */ @@ -803,8 +774,22 @@ static inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list) prev->next = next; } - -/* XXX: more streamlined implementation */ +/** + * __skb_dequeue - remove from the head of the queue + * @list: list to dequeue from + * + * Remove the head of the list. This function does not take any locks + * so must be used with appropriate locks held only. The head item is + * returned or %NULL if the list is empty. + */ +extern struct sk_buff *skb_dequeue(struct sk_buff_head *list); +static inline struct sk_buff *__skb_dequeue(struct sk_buff_head *list) +{ + struct sk_buff *skb = skb_peek(list); + if (skb) + __skb_unlink(skb, list); + return skb; +} /** * __skb_dequeue_tail - remove from the tail of the queue