From: Sagi Grimberg Date: Wed, 11 Oct 2017 12:29:10 +0000 (+0300) Subject: nvme-rdma: Don't local invalidate if the queue is not live X-Git-Tag: v4.19~2212^2~86^2~38 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=60a518863368c7e124cd8411c2481d0938f53e08;p=platform%2Fkernel%2Flinux-rpi.git nvme-rdma: Don't local invalidate if the queue is not live No chance for the local invalidate to succeed if the queue-pair is in error state. Most likely the target will do a remote invalidation of our mr so not a big loss on the test_bit. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig --- diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index 95837c5317b4..a58dd0c77a29 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -1052,7 +1052,7 @@ static void nvme_rdma_unmap_data(struct nvme_rdma_queue *queue, if (!blk_rq_bytes(rq)) return; - if (req->mr->need_inval) { + if (req->mr->need_inval && test_bit(NVME_RDMA_Q_LIVE, &req->queue->flags)) { res = nvme_rdma_inv_rkey(queue, req); if (unlikely(res < 0)) { dev_err(ctrl->ctrl.device,