nvme-tcp: don't poll a non-live queue
Sagi Grimberg
maintainerPATCH v2 1/1 nvme-tcp: don't poll a non-live queue
In error recovery we might be removing the queue so check we can actually poll before we do.
Reported-by Mark Wunderlich <[email protected]>
Signed-off-by Sagi Grimberg <[email protected]>
---
Changes from v1:
- applies cleanly on nvme-5.6-rc6
drivers/nvme/host/tcp.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/nvme/host/tcp.c +3 -0
@@ -2295,6 +2295,9 @@ 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 (!test_bit (NVME_TCP_Q_LIVE , &queue->flags)) +return 0 ; +if (sk_can_busy_loop (sk) &&skb_queue_empty_lockless (&sk->sk_receive_queue))sk_busy_loop (sk, true);nvme_tcp_try_recv (queue);
Signature · 7 lines
2.20.1 _______________________________________________ linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
Keith Busch
maintainerQuoted 5 lines · Sagi Grimberg
In error recovery we might be removing the queue so check we can actually poll before we do.
Reported-by Mark Wunderlich <[email protected]>Signed-off-by Sagi Grimberg <[email protected]>
Applied for 5.6, thanks.
_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme