IB/uverbs: Clarify and revise uverbs_close_fd
authorJason Gunthorpe <jgg@mellanox.com>
Wed, 11 Jul 2018 02:55:17 +0000 (20:55 -0600)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 25 Jul 2018 20:21:22 +0000 (14:21 -0600)
commite6d5d5ddd0869cf44a554289cd213007ccc0afde
tree4939b1a725ed92bc42c23726fbc130b097013e4b
parent5671f79b42da197466bf0908bce6f7ab4e35488f
IB/uverbs: Clarify and revise uverbs_close_fd

The locking requirements here have changed slightly now that we can rely
on the ib_uverbs_file always existing and containing all the necessary
locking infrastructure.

That means we can get rid of the cleanup_mutex usage (this was protecting
the check on !uboj->context).

Otherwise, follow the same pattern that IDR uses for destroy, acquire
exclusive write access, then call destroy and the undo the 'lookup'.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/rdma_core.c