]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/core: Update write interface to use automatic object lifetime
authorLeon Romanovsky <leonro@mellanox.com>
Sun, 19 Jul 2020 05:22:23 +0000 (08:22 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 24 Jul 2020 19:22:30 +0000 (16:22 -0300)
commit7517e4f9d07f66adadde9504ad2b2ab2d526639b
tree2354b8de3c56f8528df67b7960038bfaa45ff488
parent8086c42f3f1309d225b2d450dff8c1186cc01429
RDMA/core: Update write interface to use automatic object lifetime

The automatic object lifetime model allows us to change the write()
interface to have the same logic as the ioctl() path. Update the
create/alloc functions to be in the following format, so the code flow
will be the same:

 * Allocate objects
 * Initialize them
 * Call to the drivers, this is last step that is allowed to fail
 * Finalize object
 * Return response and allow to core code to handle abort/commit
   respectively.

Link: https://lore.kernel.org/r/20200719052223.75245-3-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/uverbs_cmd.c