nvmet-rdma: add unlikely check in the fast path
authorMax Gurtovoy <maxg@mellanox.com>
Wed, 27 Jun 2018 11:58:02 +0000 (14:58 +0300)
committerChristoph Hellwig <hch@lst.de>
Mon, 23 Jul 2018 07:35:16 +0000 (09:35 +0200)
ib_post_send operation should succeed unless something unusual
happened to the ib device.

Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/rdma.c

index 2106ae2ec17738da07ebf6a78855525ec7dc3046..4ca09456bbbb1bfe10422883d272a6fc1e07bbc9 100644 (file)
@@ -546,7 +546,7 @@ static void nvmet_rdma_queue_response(struct nvmet_req *req)
                rsp->send_sge.addr, rsp->send_sge.length,
                DMA_TO_DEVICE);
 
-       if (ib_post_send(cm_id->qp, first_wr, &bad_wr)) {
+       if (unlikely(ib_post_send(cm_id->qp, first_wr, &bad_wr))) {
                pr_err("sending cmd response failed\n");
                nvmet_rdma_release_rsp(rsp);
        }