net: Drop unused @sk of __skb_try_recv_from_queue()
__skb_try_recv_from_queue() deals with a queue, @sk is not used
since commit e427cad6ee ("net: datagram: drop 'destructor'
argument from several helpers"). Remove sk from function parameters,
adapt callers.
No functional change intended.
Signed-off-by: Michal Luczaj <mhal@rbox.co>
Reviewed-by: Joe Damato <jdamato@fastly.com>
Link: https://patch.msgid.link/20250407-cleanup-drop-param-sk-v1-1-cd076979afac@rbox.co
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
6a0f72c5e2
commit
420aabef3a
@@ -4105,8 +4105,7 @@ static inline void skb_frag_list_init(struct sk_buff *skb)
|
||||
int __skb_wait_for_more_packets(struct sock *sk, struct sk_buff_head *queue,
|
||||
int *err, long *timeo_p,
|
||||
const struct sk_buff *skb);
|
||||
struct sk_buff *__skb_try_recv_from_queue(struct sock *sk,
|
||||
struct sk_buff_head *queue,
|
||||
struct sk_buff *__skb_try_recv_from_queue(struct sk_buff_head *queue,
|
||||
unsigned int flags,
|
||||
int *off, int *err,
|
||||
struct sk_buff **last);
|
||||
|
||||
@@ -163,8 +163,7 @@ done:
|
||||
return skb;
|
||||
}
|
||||
|
||||
struct sk_buff *__skb_try_recv_from_queue(struct sock *sk,
|
||||
struct sk_buff_head *queue,
|
||||
struct sk_buff *__skb_try_recv_from_queue(struct sk_buff_head *queue,
|
||||
unsigned int flags,
|
||||
int *off, int *err,
|
||||
struct sk_buff **last)
|
||||
@@ -261,7 +260,7 @@ struct sk_buff *__skb_try_recv_datagram(struct sock *sk,
|
||||
* However, this function was correct in any case. 8)
|
||||
*/
|
||||
spin_lock_irqsave(&queue->lock, cpu_flags);
|
||||
skb = __skb_try_recv_from_queue(sk, queue, flags, off, &error,
|
||||
skb = __skb_try_recv_from_queue(queue, flags, off, &error,
|
||||
last);
|
||||
spin_unlock_irqrestore(&queue->lock, cpu_flags);
|
||||
if (error)
|
||||
|
||||
@@ -1942,8 +1942,8 @@ struct sk_buff *__skb_recv_udp(struct sock *sk, unsigned int flags,
|
||||
error = -EAGAIN;
|
||||
do {
|
||||
spin_lock_bh(&queue->lock);
|
||||
skb = __skb_try_recv_from_queue(sk, queue, flags, off,
|
||||
err, &last);
|
||||
skb = __skb_try_recv_from_queue(queue, flags, off, err,
|
||||
&last);
|
||||
if (skb) {
|
||||
if (!(flags & MSG_PEEK))
|
||||
udp_skb_destructor(sk, skb);
|
||||
@@ -1964,8 +1964,8 @@ struct sk_buff *__skb_recv_udp(struct sock *sk, unsigned int flags,
|
||||
spin_lock(&sk_queue->lock);
|
||||
skb_queue_splice_tail_init(sk_queue, queue);
|
||||
|
||||
skb = __skb_try_recv_from_queue(sk, queue, flags, off,
|
||||
err, &last);
|
||||
skb = __skb_try_recv_from_queue(queue, flags, off, err,
|
||||
&last);
|
||||
if (skb && !(flags & MSG_PEEK))
|
||||
udp_skb_dtor_locked(sk, skb);
|
||||
spin_unlock(&sk_queue->lock);
|
||||
|
||||
Reference in New Issue
Block a user