]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc3337d3ae644e5629f0f654add033b6b68fc0938
treeaa34b26eb70ed3f3edcac67ba42900ff09ee5361
parent174b7661728e50d00be7573ea969cd4b8be02459
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