]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
commit16e51f78a9db3645d2d2dd7c0a78e7e7776b630e
tree2354b8de3c56f8528df67b7960038bfaa45ff488
parent0f63ef1dd581de1655075e2dbdf2ef302514a983
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