Re: [PATCH 1/2] bhyve: fix domain management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  Wojciech Macek wrote:

> When domain is not persistent, it should be forgotten upon destroying.
> ---
>  src/bhyve/bhyve_driver.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
> index 7187202..23e7112 100644
> --- a/src/bhyve/bhyve_driver.c
> +++ b/src/bhyve/bhyve_driver.c
> @@ -753,8 +753,14 @@ bhyveDomainDestroy(virDomainPtr dom)
>  
>      ret = virBhyveProcessStop(privconn, vm, VIR_DOMAIN_SHUTOFF_DESTROYED);
>  
> - cleanup:
> -    virObjectUnlock(vm);
> +    if (!vm->persistent) {
> +        virDomainObjListRemove(privconn->domains, vm);
> +        vm = NULL;
> +    }
> +
> +cleanup:
> +    if (vm)
> +        virObjectUnlock(vm);
>      return ret;
>  }

ACK, I'm going to push that tomorrow if there'll be no other notes. 

Roman Bogorodskiy

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]