diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2018-11-25 21:51:14 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-11-27 02:48:07 +0300 |
commit | 7106a9769715bb4c0448927a29aa3b505855871c (patch) | |
tree | 48bfaac92a7adfedbf50c224bf054f519008c3b4 /drivers/infiniband/core/rdma_core.c | |
parent | 8313c10fa8be032fccc1e757bccc21207f533127 (diff) | |
download | linux-7106a9769715bb4c0448927a29aa3b505855871c.tar.xz |
RDMA/uverbs: Make write() handlers return 0 on success
Currently they return the command length, while all other handlers return
0. This makes the write path closer to the write_ex and ioctl path.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/rdma_core.c')
-rw-r--r-- | drivers/infiniband/core/rdma_core.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/infiniband/core/rdma_core.c b/drivers/infiniband/core/rdma_core.c index cf671a643d4c..efa292489271 100644 --- a/drivers/infiniband/core/rdma_core.c +++ b/drivers/infiniband/core/rdma_core.c @@ -245,13 +245,11 @@ struct ib_uobject *__uobj_get_destroy(const struct uverbs_api_object *obj, } /* - * Does both uobj_get_destroy() and uobj_put_destroy(). Returns success_res - * on success (negative errno on failure). For use by callers that do not need - * the uobj. + * Does both uobj_get_destroy() and uobj_put_destroy(). Returns 0 on success + * (negative errno on failure). For use by callers that do not need the uobj. */ int __uobj_perform_destroy(const struct uverbs_api_object *obj, u32 id, - const struct uverbs_attr_bundle *attrs, - int success_res) + const struct uverbs_attr_bundle *attrs) { struct ib_uobject *uobj; @@ -260,7 +258,7 @@ int __uobj_perform_destroy(const struct uverbs_api_object *obj, u32 id, return PTR_ERR(uobj); rdma_lookup_put_uobject(uobj, UVERBS_LOOKUP_WRITE); - return success_res; + return 0; } /* alloc_uobj must be undone by uverbs_destroy_uobject() */ |