aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2019-10-24 01:44:50 -0400
committerDavid S. Miller <davem@davemloft.net>2019-10-28 16:33:41 -0400
commit3ef7cf57c72f32f61e97f8fa401bc39ea1f1a5d4 (patch)
tree7f962942a142ed611e6c063171ef0092f8af8fd8 /net/tipc/socket.c
parent137a0dbe3426fd7bcfe3f8117b36a87b3590e4eb (diff)
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/socket.c')
-rw-r--r--net/tipc/socket.c4
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,
740 /* fall through */ 740 /* fall through */
741 case TIPC_LISTEN: 741 case TIPC_LISTEN:
742 case TIPC_CONNECTING: 742 case TIPC_CONNECTING:
743 if (!skb_queue_empty(&sk->sk_receive_queue)) 743 if (!skb_queue_empty_lockless(&sk->sk_receive_queue))
744 revents |= EPOLLIN | EPOLLRDNORM; 744 revents |= EPOLLIN | EPOLLRDNORM;
745 break; 745 break;
746 case TIPC_OPEN: 746 case TIPC_OPEN:
@@ -748,7 +748,7 @@ static __poll_t tipc_poll(struct file *file, struct socket *sock,
748 revents |= EPOLLOUT; 748 revents |= EPOLLOUT;
749 if (!tipc_sk_type_connectionless(sk)) 749 if (!tipc_sk_type_connectionless(sk))
750 break; 750 break;
751 if (skb_queue_empty(&sk->sk_receive_queue)) 751 if (skb_queue_empty_lockless(&sk->sk_receive_queue))
752 break; 752 break;
753 revents |= EPOLLIN | EPOLLRDNORM; 753 revents |= EPOLLIN | EPOLLRDNORM;
754 break; 754 break;