OSDN Git Service

IB/uverbs: Make the write path destroy methods use the same flow as ioctl
authorJason Gunthorpe <jgg@mellanox.com>
Thu, 26 Jul 2018 03:40:11 +0000 (21:40 -0600)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 1 Aug 2018 20:55:48 +0000 (14:55 -0600)
commit32ed5c00ac5fdea49058fd49bf8707e101dc3dfe
treee8e6c3e38713d9693556786ac56bff9bcc20ebea
parentaa72c9a5f986444f5e245767402ed1f3066fca2c
IB/uverbs: Make the write path destroy methods use the same flow as ioctl

The ridiculous dance with uobj_remove_commit() is not needed, the write
path can follow the same flow as ioctl - lock and destroy the HW object
then use the data left over in the uobject to form the response to
userspace.

Two helpers are introduced to make this flow straightforward for the
caller.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/rdma_core.c
drivers/infiniband/core/uverbs_cmd.c
include/rdma/uverbs_std_types.h
include/rdma/uverbs_types.h