• Jason Gunthorpe's avatar
    IB/uverbs: Consolidate uobject destruction · 87ad80ab
    Jason Gunthorpe authored
    There are several flows that can destroy a uobject and each one is
    minimized and sprinkled throughout the code base, making it difficult to
    understand and very hard to modify the destroy path.
    
    Consolidate all of these into uverbs_destroy_uobject() and call it in all
    cases where a uobject has to be destroyed.
    
    This makes one change to the lifecycle, during any abort (eg when
    alloc_commit is not called) we always call out to alloc_abort, even if
    remove_commit needs to be called to delete a HW object.
    
    This also renames RDMA_REMOVE_DURING_CLEANUP to RDMA_REMOVE_ABORT to
    clarify its actual usage and revises some of the comments to reflect what
    the life cycle is for the type implementation.
    Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
    87ad80ab
rdma_core.c 24.9 KB