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
@@ -338,9 +338,9 @@ static __poll_t pn_socket_poll(struct file *file, struct socket *sock,
|
||||
|
||||
if (sk->sk_state == TCP_CLOSE)
|
||||
return EPOLLERR;
|
||||
if (!skb_queue_empty(&sk->sk_receive_queue))
|
||||
if (!skb_queue_empty_lockless(&sk->sk_receive_queue))
|
||||
mask |= EPOLLIN | EPOLLRDNORM;
|
||||
if (!skb_queue_empty(&pn->ctrlreq_queue))
|
||||
if (!skb_queue_empty_lockless(&pn->ctrlreq_queue))
|
||||
mask |= EPOLLPRI;
|
||||
if (!mask && sk->sk_state == TCP_CLOSE_WAIT)
|
||||
return EPOLLHUP;
|
||||
|
Reference in New Issue
Block a user