summaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorDavid S. Miller2018-08-12 03:43:38 +0200
committerDavid S. Miller2018-09-10 19:06:53 +0200
commit8b69bd7d8a8927d537f134c37bcca6cbfa58e1b2 (patch)
tree4f15d43212cf8d4ccb712d23e5c7c21999e39477 /include/linux/skbuff.h
parentinfiniband: nes: Use skb_peek_next() and skb_queue_walk(). (diff)
downloadkernel-qcow2-linux-8b69bd7d8a8927d537f134c37bcca6cbfa58e1b2.tar.gz
kernel-qcow2-linux-8b69bd7d8a8927d537f134c37bcca6cbfa58e1b2.tar.xz
kernel-qcow2-linux-8b69bd7d8a8927d537f134c37bcca6cbfa58e1b2.zip
ppp: Remove direct skb_queue_head list pointer access.
Add a helper, __skb_peek(), and use it in ppp_mp_reconstruct(). Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 17a13e4785fc..89283b77294d 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1593,6 +1593,17 @@ static inline struct sk_buff *skb_peek(const struct sk_buff_head *list_)
}
/**
+ * __skb_peek - peek at the head of a non-empty &sk_buff_head
+ * @list_: list to peek at
+ *
+ * Like skb_peek(), but the caller knows that the list is not empty.
+ */
+static inline struct sk_buff *__skb_peek(const struct sk_buff_head *list_)
+{
+ return list_->next;
+}
+
+/**
* skb_peek_next - peek skb following the given one from a queue
* @skb: skb to start from
* @list_: list to peek at