|
@@ -57,7 +57,7 @@ static int check_parent(struct ib_umem_odp *odp,
|
|
|
{
|
|
|
struct mlx5_ib_mr *mr = odp->private;
|
|
|
|
|
|
- return mr && mr->parent == parent;
|
|
|
+ return mr && mr->parent == parent && !odp->dying;
|
|
|
}
|
|
|
|
|
|
static struct ib_umem_odp *odp_next(struct ib_umem_odp *odp)
|
|
@@ -158,13 +158,6 @@ static void mr_leaf_free_action(struct work_struct *work)
|
|
|
mr->parent = NULL;
|
|
|
synchronize_srcu(&mr->dev->mr_srcu);
|
|
|
|
|
|
- if (!READ_ONCE(odp->dying)) {
|
|
|
- mr->parent = imr;
|
|
|
- if (atomic_dec_and_test(&imr->num_leaf_free))
|
|
|
- wake_up(&imr->q_leaf_free);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
ib_umem_release(odp->umem);
|
|
|
if (imr->live)
|
|
|
mlx5_ib_update_xlt(imr, idx, 1, 0,
|
|
@@ -436,8 +429,6 @@ next_mr:
|
|
|
nentries++;
|
|
|
}
|
|
|
|
|
|
- odp->dying = 0;
|
|
|
-
|
|
|
/* Return first odp if region not covered by single one */
|
|
|
if (likely(!result))
|
|
|
result = odp;
|