mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
qemuhotplugtest: Fix misleading comment on monitor unlock
There's a comment in testQemuHotplug() trying to explain why we need to unlock the monitor object. Well, while it might have been correct when being introduced, it's no longer factually correct as just any function (attach/detach/update) might talk to the monitor and it expects the monitor to be unlocked (as it calls qemuDomainObjEnterMonitor() + qemuDomainObjExitMonitor()). Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
This commit is contained in:
parent
541582a91b
commit
dc4ec0e30b
@ -223,9 +223,8 @@ testQemuHotplug(const void *data)
|
||||
priv = vm->privateData;
|
||||
priv->mon = qemuMonitorTestGetMonitor(test_mon);
|
||||
|
||||
/* XXX We need to unlock the monitor here, as
|
||||
* qemuDomainObjEnterMonitorInternal (called from qemuDomainChangeGraphics)
|
||||
* tries to lock it again */
|
||||
/* We need to unlock the monitor here, as any function below talks
|
||||
* (transitively) on the monitor. */
|
||||
virObjectUnlock(priv->mon);
|
||||
|
||||
switch (test->action) {
|
||||
|
Loading…
Reference in New Issue
Block a user