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
@@ -2712,7 +2712,7 @@ __poll_t udp_poll(struct file *file, struct socket *sock, poll_table *wait)
|
||||
__poll_t mask = datagram_poll(file, sock, wait);
|
||||
struct sock *sk = sock->sk;
|
||||
|
||||
if (!skb_queue_empty(&udp_sk(sk)->reader_queue))
|
||||
if (!skb_queue_empty_lockless(&udp_sk(sk)->reader_queue))
|
||||
mask |= EPOLLIN | EPOLLRDNORM;
|
||||
|
||||
/* Check for false positives due to checksum errors */
|
||||
|
Reference in New Issue
Block a user