From 10bf55c99fabca2e8fb792444ad59c7c4be4007a Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Mon, 15 Mar 2021 14:10:45 +0100 Subject: [PATCH] qemu_driver: fix setting vcpu_quota if not all vCPUs are online When switching to g_autoptr this was incorrectly changed from 'continue;' into 'return -1;' resulting into an error when user tries to set vcpu_quota of running VM: error: An error occurred, but the cause is unknown Fixes: e4a8bbfaf2b4cdd741bb441873bb730f9134b714 Signed-off-by: Pavel Hrdina Reviewed-by: Erik Skultety --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index b7c89a826a..16c5ccae45 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -9204,7 +9204,7 @@ qemuSetVcpusBWLive(virDomainObjPtr vm, virCgroupPtr cgroup, virDomainVcpuDefPtr vcpu = virDomainDefGetVcpu(vm->def, i); if (!vcpu->online) - return -1; + continue; if (virCgroupNewThread(cgroup, VIR_CGROUP_THREAD_VCPU, i, false, &cgroup_vcpu) < 0)