diff options
author | Max Gurtovoy <maxg@mellanox.com> | 2019-09-24 00:32:49 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-10-01 11:23:22 -0300 |
commit | 70bcc63f84eaa08c53a14e669550cffc947ca3b7 (patch) | |
tree | 472d373c26d4f0b11a8ad45c3e33084cc4e217d8 /drivers/infiniband/ulp/iser/iser_memory.c | |
parent | 663912a6378a34fd4f43b8d873f0c6c6322d9d0e (diff) | |
download | linux-70bcc63f84eaa08c53a14e669550cffc947ca3b7.tar.bz2 |
IB/iser: add unlikely checks in the fast path
ib_post_send, ib_post_recv and ib_dma_map_sg operations should succeed
unless something unusual happened to the ib device.
Link: https://lore.kernel.org/r/1569274369-29217-1-git-send-email-maxg@mellanox.com
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Acked-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/ulp/iser/iser_memory.c')
-rw-r--r-- | drivers/infiniband/ulp/iser/iser_memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c index 2cc89a9b9e9b..3a26e5be1717 100644 --- a/drivers/infiniband/ulp/iser/iser_memory.c +++ b/drivers/infiniband/ulp/iser/iser_memory.c @@ -170,7 +170,7 @@ int iser_dma_map_task_data(struct iscsi_iser_task *iser_task, dev = iser_task->iser_conn->ib_conn.device->ib_device; data->dma_nents = ib_dma_map_sg(dev, data->sg, data->size, dma_dir); - if (data->dma_nents == 0) { + if (unlikely(data->dma_nents == 0)) { iser_err("dma_map_sg failed!!!\n"); return -EINVAL; } |