Skip to content

Commit 84c2362

Browse files
aharonl-nvidiajgunthorpe
authored andcommitted
RDMA/mlx5: Don't remove cache MRs when a delay is needed
Don't remove MRs from the cache if need to delay the removal. Fixes: b9358bd ("RDMA/mlx5: Fix locking in MR cache work queue") Link: https://lore.kernel.org/r/c3087a90ff362c8796c7eaa2715128743ce36722.1649062436.git.leonro@nvidia.com Signed-off-by: Aharon Landau <aharonl@nvidia.com> Reviewed-by: Shay Drory <shayd@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent abcc160 commit 84c2362

File tree

1 file changed

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

1 file changed

+3
-1
lines changed

drivers/infiniband/hw/mlx5/mr.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,10 @@ static void __cache_work_func(struct mlx5_cache_ent *ent)
574574
spin_lock_irq(&ent->lock);
575575
if (ent->disabled)
576576
goto out;
577-
if (need_delay)
577+
if (need_delay) {
578578
queue_delayed_work(cache->wq, &ent->dwork, 300 * HZ);
579+
goto out;
580+
}
579581
remove_cache_mr_locked(ent);
580582
queue_adjust_cache_locked(ent);
581583
}

0 commit comments

Comments
 (0)