Re: [PATCH 2/4] qemu: Refactor managed save functions to use domain lookup helpers

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

 



On 12/11/12 22:50, Eric Blake wrote:
On 12/11/2012 11:48 AM, Peter Krempa wrote:
---
  src/qemu/qemu_driver.c | 54 +++++++++++---------------------------------------
  1 file changed, 12 insertions(+), 42 deletions(-)

Nice reduction in size. However, you need a v2...


[...]


-cleanup:
-    if (vm)
-        virDomainObjUnlock(vm);
-    qemuDriverUnlock(driver);
-    return ret;
+    return vm->hasManagedSave;
  }

Ouch.  This leaves vm locked on exit.  It needs to look more like:

Removal of code is really addictive :) I got carried away and strived
for more lines :) V2 comming in soon.


if !(vm = qemuDomObjFromDomain(dom)))
     return -1;
ret = vm->hasManagedSave;
virDomainObjUnlock(vm);
retun ret;


Peter

--
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]