]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit29032cf1931d5a547a50348be70659ef2ef60dce
tree42e5675db18e41897fed7e6095c8fcbd45917d2a
parent5b2fec87944e37360175fdc9c1755f16838e54ee
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