Commit c985bd0e authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Doug Ledford

RDMA/mlx5: Guard ODP specific assignments with specific CONFIG

"live" is needed for ODP only and is better to be guarded
by appropriate CONFIG.
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 4638a3b2
...@@ -1296,7 +1296,9 @@ struct ib_mr *mlx5_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length, ...@@ -1296,7 +1296,9 @@ struct ib_mr *mlx5_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
} }
} }
#ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING
mr->live = 1; mr->live = 1;
#endif
return &mr->ibmr; return &mr->ibmr;
error: error:
ib_umem_release(umem); ib_umem_release(umem);
...@@ -1405,7 +1407,9 @@ int mlx5_ib_rereg_user_mr(struct ib_mr *ib_mr, int flags, u64 start, ...@@ -1405,7 +1407,9 @@ int mlx5_ib_rereg_user_mr(struct ib_mr *ib_mr, int flags, u64 start,
} }
mr->allocated_from_cache = 0; mr->allocated_from_cache = 0;
#ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING
mr->live = 1; mr->live = 1;
#endif
} else { } else {
/* /*
* Send a UMR WQE * Send a UMR WQE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment