]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc8eb5c5027ac1294fb322cb660b894db35c7b518
tree4939b1a725ed92bc42c23726fbc130b097013e4b
parent4765f5e6b0558b613943ae7e2ee1e9e9b13d84a7
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