diff options
author | Matan Barak <matanb@mellanox.com> | 2017-08-03 16:07:02 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-08-31 08:35:11 -0400 |
commit | 4da70da23e9ba03f7f9e067fbe0eec6ebbfee401 (patch) | |
tree | 42e5675db18e41897fed7e6095c8fcbd45917d2a /include/rdma | |
parent | 3541030650c0ddb5d52163082fee427b2a453799 (diff) | |
download | op-kernel-dev-4da70da23e9ba03f7f9e067fbe0eec6ebbfee401.zip op-kernel-dev-4da70da23e9ba03f7f9e067fbe0eec6ebbfee401.tar.gz |
IB/core: Explicitly destroy an object while keeping uobject
When some objects are destroyed, we need to extract their status at
destruction. After object's destruction, this status
(e.g. events_reported) relies in the uobject. In order to have the
latest and correct status, the underlying object should be destroyed,
but we should keep the uobject alive and read this information off the
uobject. We introduce a rdma_explicit_destroy function. This function
destroys the class type object (for example, the IDR class type which
destroys the underlying object as well) and then convert the uobject
to be of a null class type. This uobject will then be destroyed as any
other uobject once uverbs_finalize_object[s] is called.
Signed-off-by: Matan Barak <matanb@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma')
-rw-r--r-- | include/rdma/uverbs_types.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/rdma/uverbs_types.h b/include/rdma/uverbs_types.h index 9760b6d..cc04ec6 100644 --- a/include/rdma/uverbs_types.h +++ b/include/rdma/uverbs_types.h @@ -129,6 +129,7 @@ struct ib_uobject *rdma_alloc_begin_uobject(const struct uverbs_obj_type *type, void rdma_alloc_abort_uobject(struct ib_uobject *uobj); int __must_check rdma_remove_commit_uobject(struct ib_uobject *uobj); int rdma_alloc_commit_uobject(struct ib_uobject *uobj); +int rdma_explicit_destroy(struct ib_uobject *uobject); struct uverbs_obj_fd_type { /* |