diff options
author | Eric Dumazet <edumazet@google.com> | 2019-10-23 22:44:51 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-28 13:33:41 -0700 |
commit | 3f926af3f4d688e2e11e7f8ed04e277a14d4d4a4 (patch) | |
tree | 3cdc7bbab6fc9caa1282afe98eddd91add1aabd7 /drivers/nvme | |
parent | 3ef7cf57c72f32f61e97f8fa401bc39ea1f1a5d4 (diff) | |
download | linux-3f926af3f4d688e2e11e7f8ed04e277a14d4d4a4.tar.bz2 |
net: use skb_queue_empty_lockless() in busy poll contexts
Busy polling usually runs without locks.
Let's use skb_queue_empty_lockless() instead of skb_queue_empty()
Also uses READ_ONCE() in __skb_try_recv_datagram() to address
a similar potential problem.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 770dbcbc999e..7544be84ab35 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -2219,7 +2219,7 @@ static int nvme_tcp_poll(struct blk_mq_hw_ctx *hctx) struct nvme_tcp_queue *queue = hctx->driver_data; struct sock *sk = queue->sock->sk; - if (sk_can_busy_loop(sk) && skb_queue_empty(&sk->sk_receive_queue)) + if (sk_can_busy_loop(sk) && skb_queue_empty_lockless(&sk->sk_receive_queue)) sk_busy_loop(sk, true); nvme_tcp_try_recv(queue); return queue->nr_cqe; |