Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b69bd7d authored by David S. Miller's avatar David S. Miller
Browse files

ppp: Remove direct skb_queue_head list pointer access.



Add a helper, __skb_peek(), and use it in ppp_mp_reconstruct().

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0c69198d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2400,7 +2400,7 @@ ppp_mp_reconstruct(struct ppp *ppp)

	if (ppp->mrru == 0)	/* do nothing until mrru is set */
		return NULL;
	head = list->next;
	head = __skb_peek(list);
	tail = NULL;
	skb_queue_walk_safe(list, p, tmp) {
	again:
+11 −0
Original line number Diff line number Diff line
@@ -1592,6 +1592,17 @@ static inline struct sk_buff *skb_peek(const struct sk_buff_head *list_)
	return skb;
}

/**
 *	__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