OSDN Git Service

nvmet-rdma: add unlikely check at nvmet_rdma_map_sgl_keyed
authorIsrael Rukshin <israelr@mellanox.com>
Sun, 13 Oct 2019 16:57:34 +0000 (19:57 +0300)
committerJens Axboe <axboe@kernel.dk>
Mon, 4 Nov 2019 17:56:41 +0000 (10:56 -0700)
commit59534b9d606e7f566970a6f8621c6022f7c19ff1
treec8bbe262d1f014b9c7bca2142b03535446995196
parente522f446027845e3c8b563d021f37e8f3d30c9d9
nvmet-rdma: add unlikely check at nvmet_rdma_map_sgl_keyed

The calls to nvmet_req_alloc_sgl and rdma_rw_ctx_init should usually
succeed, so add this simple optimization to the fast path.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/target/rdma.c