Skip to content

Commit 2e4e706

Browse files
committed
RDMA/mlx5: Remove dead check for EAGAIN after alloc_mr_from_cache()
alloc_mr_from_cache() no longer returns EAGAIN, this is just dead code now. Fixes: aad719d ("RDMA/mlx5: Allow MRs to be created in the cache synchronously") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 22d3e1e commit 2e4e706

File tree

1 file changed

+1
-3
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+1
-3
lines changed

drivers/infiniband/hw/mlx5/mr.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,10 +1392,8 @@ struct ib_mr *mlx5_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
13921392
if (order <= mr_cache_max_order(dev) && use_umr) {
13931393
mr = alloc_mr_from_cache(pd, umem, virt_addr, length, ncont,
13941394
page_shift, order, access_flags);
1395-
if (PTR_ERR(mr) == -EAGAIN) {
1396-
mlx5_ib_dbg(dev, "cache empty for order %d\n", order);
1395+
if (IS_ERR(mr))
13971396
mr = NULL;
1398-
}
13991397
} else if (!MLX5_CAP_GEN(dev->mdev, umr_extended_translation_offset)) {
14001398
if (access_flags & IB_ACCESS_ON_DEMAND) {
14011399
err = -EINVAL;

0 commit comments

Comments
 (0)