diff options
author | Eric Dumazet <edumazet@google.com> | 2019-10-24 08:44:50 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-28 23:33:41 +0300 |
commit | 3ef7cf57c72f32f61e97f8fa401bc39ea1f1a5d4 (patch) | |
tree | 7f962942a142ed611e6c063171ef0092f8af8fd8 /net/tipc | |
parent | 137a0dbe3426fd7bcfe3f8117b36a87b3590e4eb (diff) | |
download | linux-3ef7cf57c72f32f61e97f8fa401bc39ea1f1a5d4.tar.xz |
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>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index f8bbc4aab213..4b92b196cfa6 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -740,7 +740,7 @@ static __poll_t tipc_poll(struct file *file, struct socket *sock, /* fall through */ case TIPC_LISTEN: case TIPC_CONNECTING: - if (!skb_queue_empty(&sk->sk_receive_queue)) + if (!skb_queue_empty_lockless(&sk->sk_receive_queue)) revents |= EPOLLIN | EPOLLRDNORM; break; case TIPC_OPEN: @@ -748,7 +748,7 @@ static __poll_t tipc_poll(struct file *file, struct socket *sock, revents |= EPOLLOUT; if (!tipc_sk_type_connectionless(sk)) break; - if (skb_queue_empty(&sk->sk_receive_queue)) + if (skb_queue_empty_lockless(&sk->sk_receive_queue)) break; revents |= EPOLLIN | EPOLLRDNORM; break; |