mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
net: use skb_queue_empty_lockless() in poll() handlers
Many poll() handlers are lockless. Using skb_queue_empty_lockless() instead of skb_queue_empty() is more appropriate. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
137a0dbe34
commit
3ef7cf57c7
@@ -584,7 +584,7 @@ __poll_t tcp_poll(struct file *file, struct socket *sock, poll_table *wait)
|
||||
}
|
||||
/* This barrier is coupled with smp_wmb() in tcp_reset() */
|
||||
smp_rmb();
|
||||
if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
|
||||
if (sk->sk_err || !skb_queue_empty_lockless(&sk->sk_error_queue))
|
||||
mask |= EPOLLERR;
|
||||
|
||||
return mask;
|
||||
|
||||
Reference in New Issue
Block a user