aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2018-07-04 04:32:06 -0400
committerJason Gunthorpe <jgg@mellanox.com>2018-07-09 13:26:17 -0400
commitc33e73af2183fb9fcd993e37abcdecc058b22d91 (patch)
treef85591d06f6362c845a38f8473be7916ee238822 /include/rdma
parent422e3d37ed7ea8b421208a44913c420055334976 (diff)
IB/uverbs: Add a uobj_perform_destroy helper
This consolidates a bunch of repeated code patterns into a helper. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/uverbs_std_types.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/rdma/uverbs_std_types.h b/include/rdma/uverbs_std_types.h
index 4c151b67fb6d..27c24453fc12 100644
--- a/include/rdma/uverbs_std_types.h
+++ b/include/rdma/uverbs_std_types.h
@@ -71,6 +71,11 @@ static inline struct ib_uobject *__uobj_get(const struct uverbs_obj_type *type,
71#define uobj_get_write(_type, _id, _ucontext) \ 71#define uobj_get_write(_type, _id, _ucontext) \
72 __uobj_get(uobj_get_type(_type), true, _ucontext, _id) 72 __uobj_get(uobj_get_type(_type), true, _ucontext, _id)
73 73
74int __uobj_perform_destroy(const struct uverbs_obj_type *type, int id,
75 struct ib_uverbs_file *ufile, int success_res);
76#define uobj_perform_destroy(_type, _id, _ufile, _success_res) \
77 __uobj_perform_destroy(uobj_get_type(_type), _id, _ufile, _success_res)
78
74static inline void uobj_put_read(struct ib_uobject *uobj) 79static inline void uobj_put_read(struct ib_uobject *uobj)
75{ 80{
76 rdma_lookup_put_uobject(uobj, false); 81 rdma_lookup_put_uobject(uobj, false);