IB/core: Explicitly destroy an object while keeping uobject
authorMatan Barak <matanb@mellanox.com>
Thu, 3 Aug 2017 13:07:02 +0000 (16:07 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 31 Aug 2017 12:35:11 +0000 (08:35 -0400)
commit4da70da23e9ba03f7f9e067fbe0eec6ebbfee401
tree42e5675db18e41897fed7e6095c8fcbd45917d2a
parent3541030650c0ddb5d52163082fee427b2a453799
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>
drivers/infiniband/core/rdma_core.c
include/rdma/uverbs_types.h