mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemu: driver: Reuse qemuDomainGetMonitor in qemuDomainMemoryStats
This commit is contained in:
parent
d6cb0d256a
commit
c0e962b6f3
@ -11473,7 +11473,6 @@ qemuDomainMemoryStats(virDomainPtr dom,
|
||||
unsigned int flags)
|
||||
{
|
||||
virQEMUDriverPtr driver = dom->conn->privateData;
|
||||
qemuDomainObjPrivatePtr priv;
|
||||
virDomainObjPtr vm;
|
||||
int ret = -1;
|
||||
long rss;
|
||||
@ -11497,9 +11496,8 @@ qemuDomainMemoryStats(virDomainPtr dom,
|
||||
|
||||
if (vm->def->memballoon &&
|
||||
vm->def->memballoon->model == VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO) {
|
||||
priv = vm->privateData;
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
ret = qemuMonitorGetMemoryStats(priv->mon, stats, nr_stats);
|
||||
ret = qemuMonitorGetMemoryStats(qemuDomainGetMonitor(vm), stats, nr_stats);
|
||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
||||
ret = -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user