• J
    bhyve: Use virDomainObjListFindBy{UUID|ID}Ref · f52d0d42
    John Ferlan 提交于
    For bhyveDomObjFromDomain, bhyveDomainLookupByUUID, and
    bhyveDomainLookupByID let's return a locked and referenced
    @vm object so that callers can then use the common and more
    consistent virDomainObjEndAPI in order to handle cleanup rather
    than needing to know that the returned object is locked and
    calling virObjectUnlock.
    
    The LookupByName already returns the ref counted and locked object,
    so this will make things more consistent.
    
    For bhyveDomainUndefine and bhyveDomainDestroy since the
    virDomainObjListRemove will return an unlocked object, we need to
    relock before making the EndAPI call.
    Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
    f52d0d42
bhyve_driver.c 47.6 KB