RDMA/core: Properly increment and decrement QP usecnts
authorLeon Romanovsky <leonro@nvidia.com>
Tue, 3 Aug 2021 18:20:37 +0000 (21:20 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 3 Aug 2021 18:26:19 +0000 (15:26 -0300)
commit5507f67d08cdd947714647caa5c60f96b719fcb7
tree3b823fd6a865f7a3759ecf11ceed86a33dc8be8a
parent00a79d6b996d46e9077b0d02a19c87b99305b94a
RDMA/core: Properly increment and decrement QP usecnts

The QP usecnts were incremented through QP attributes structure while
decreased through QP itself. Rely on the ib_creat_qp_user() code that
initialized all QP parameters prior returning to the user and increment
exactly like destroy does.

Link: https://lore.kernel.org/r/25d256a3bb1fc480b77d7fe439817b993de48610.1628014762.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/core_priv.h
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/core/uverbs_std_types_qp.c
drivers/infiniband/core/verbs.c