RDMA/core: Remove ucontext_lock from the uverbs_destry_ufile_hw() path
authorJason Gunthorpe <jgg@mellanox.com>
Wed, 8 Jan 2020 18:05:33 +0000 (20:05 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 16 Jan 2020 19:55:45 +0000 (15:55 -0400)
commitda57db25677f8566a354b0d0e4973a0fdcabcf84
treefb92069dc515e2f813156a3ed8d2a2046c13c95c
parentd680e88e2013186e696665cbf2056fb32b781e41
RDMA/core: Remove ucontext_lock from the uverbs_destry_ufile_hw() path

This lock only serializes ucontext creation. Instead of checking the
ucontext_lock during destruction hold the existing hw_destroy_rwsem during
creation, which is the standard pattern for object creation.

The simplification of locking is needed for the next patch.

Link: https://lore.kernel.org/r/1578506740-22188-4-git-send-email-yishaih@mellanox.com
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/rdma_core.c
drivers/infiniband/core/uverbs_cmd.c