From: Max Gurtovoy Date: Wed, 27 Jun 2018 11:58:02 +0000 (+0300) Subject: nvmet-rdma: add unlikely check in the fast path X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=2fc464e2162c2b2f7faf7404fa9c35d1cf70aa00;p=openwrt%2Fstaging%2Fblogic.git nvmet-rdma: add unlikely check in the fast path ib_post_send operation should succeed unless something unusual happened to the ib device. Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig --- diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c index 2106ae2ec177..4ca09456bbbb 100644 --- a/drivers/nvme/target/rdma.c +++ b/drivers/nvme/target/rdma.c @@ -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); }