RDMA/counter: Combine allocation and bind logic
authorLeon Romanovsky <leonro@nvidia.com>
Wed, 4 Nov 2020 14:40:05 +0000 (16:40 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 16 Nov 2020 18:34:01 +0000 (14:34 -0400)
commit8bc205eff3056a9ed3850937cdd2192f05e6d3cb
treec4795dbbaaa41817c9ecc2ddf799a83d794f9cf0
parent7af80c02c7b3cf7ac580a33f15d155730574769f
RDMA/counter: Combine allocation and bind logic

RDMA counters are allocated and bounded to QP immediately after that.
Only after this two step process they are really usable. By combining
the logic, we are ensuring that once counter is returned to the caller,
it will have everything set.

Link: https://lore.kernel.org/r/20201104144008.3808124-3-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/counters.c