OSDN Git Service

IB/uverbs: Move non driver related elements from ib_ucontext to ib_ufile
authorJason Gunthorpe <jgg@mellanox.com>
Wed, 4 Jul 2018 08:32:07 +0000 (11:32 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 9 Jul 2018 17:26:17 +0000 (11:26 -0600)
commit6a5e9c88419828a487204e35291ae4459697a9bd
treeaa34b26eb70ed3f3edcac67ba42900ff09ee5361
parentc33e73af2183fb9fcd993e37abcdecc058b22d91
IB/uverbs: Move non driver related elements from ib_ucontext to ib_ufile

The IDR is part of the ib_ufile so all the machinery to lock it, handle
closing and disassociation rightly belongs to the ufile not the ucontext.

This changes the lifetime of that data to match the lifetime of the file
descriptor which is always strictly longer than the lifetime of the
ucontext.

We need the entire locking machinery to continue to exist after ucontext
destruction to allow us to return the destroy data after a device has been
disassociated.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
drivers/infiniband/core/rdma_core.c
drivers/infiniband/core/rdma_core.h
drivers/infiniband/core/uverbs.h
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/core/uverbs_main.c
include/rdma/ib_verbs.h