[libvirt] [PATCH v2 5/5] uml: Use virDomainObjListFindBy{UUID|ID}Ref

Daniel P. Berrangé berrange at redhat.com
Thu Apr 19 13:56:33 UTC 2018


On Mon, Apr 02, 2018 at 09:06:16AM -0400, John Ferlan wrote:
> For umlDomObjFromDomainLocked and umlDomainLookupByID 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. This
> means for some consumers we need to relock the @dom after a
> virDomainObjListRemove, but before calling virDomainObjEndAPI.
> 
> The LookupByName already returns the ref counted and locked object,
> so this will make things more consistent.
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  src/uml/uml_driver.c | 91 ++++++++++++++++++----------------------------------
>  1 file changed, 32 insertions(+), 59 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list