RDMA/cma: Remove unneeded locking for req paths
authorJason Gunthorpe <jgg@nvidia.com>
Thu, 23 Jul 2020 07:07:06 +0000 (10:07 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 29 Jul 2020 17:10:02 +0000 (14:10 -0300)
commitcc9c037343898eb7a775e6b81d092ee21eeff218
tree5124d81370bc593ce63732db0b3e0f5eb19d922c
parent3647a28de1ada8708efc78d956619b9df5004478
RDMA/cma: Remove unneeded locking for req paths

The REQ flows are concerned that once the handler is called on the new
cm_id the ULP can choose to trigger a rdma_destroy_id() concurrently at
any time.

However, this is not true, while the ULP can call rdma_destroy_id(), it
immediately blocks on the handler_mutex which prevents anything harmful
from running concurrently.

Remove the confusing extra locking and refcounts and make the
handler_mutex protecting state during destroy more clear.

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