Skip to content

Commit 1d735ee

Browse files
aharonl-nvidiajgunthorpe
authored andcommitted
RDMA/mlx5: Add a missing update of cache->last_add
Update cache->last_add when returning an MR to the cache so that the cache work won't remove it. Fixes: b9358bd ("RDMA/mlx5: Fix locking in MR cache work queue") Link: https://lore.kernel.org/r/c99f076fce4b44829d434936bbcd3b5fc4c95020.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 84c2362 commit 1d735ee

File tree

1 file changed

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

1 file changed

+1
-0
lines changed

drivers/infiniband/hw/mlx5/mr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ static void mlx5_mr_cache_free(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr)
627627
{
628628
struct mlx5_cache_ent *ent = mr->cache_ent;
629629

630+
WRITE_ONCE(dev->cache.last_add, jiffies);
630631
spin_lock_irq(&ent->lock);
631632
list_add_tail(&mr->list, &ent->head);
632633
ent->available_mrs++;

0 commit comments

Comments
 (0)