mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 13:37:36 +02:00
RDMA/mlx5: Don't remove cache MRs when a delay is needed
[ Upstream commit84c2362fb6] Don't remove MRs from the cache if need to delay the removal. Fixes:b9358bdbc7("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d8992b393f
commit
3a57babfb6
|
|
@ -531,8 +531,10 @@ static void __cache_work_func(struct mlx5_cache_ent *ent)
|
||||||
spin_lock_irq(&ent->lock);
|
spin_lock_irq(&ent->lock);
|
||||||
if (ent->disabled)
|
if (ent->disabled)
|
||||||
goto out;
|
goto out;
|
||||||
if (need_delay)
|
if (need_delay) {
|
||||||
queue_delayed_work(cache->wq, &ent->dwork, 300 * HZ);
|
queue_delayed_work(cache->wq, &ent->dwork, 300 * HZ);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
remove_cache_mr_locked(ent);
|
remove_cache_mr_locked(ent);
|
||||||
queue_adjust_cache_locked(ent);
|
queue_adjust_cache_locked(ent);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user