diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 9d39370308..7c6b2c16c6 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -1131,7 +1131,7 @@ qemuSetupCgroupForIOThreads(virDomainObjPtr vm) if (priv->cgroup == NULL) return 0; - if (priv->niothreadpids == 0) { + if (def->iothreads && priv->niothreadpids == 0) { VIR_WARN("Unable to get iothreads' pids."); return 0; } diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 8853d273e5..c5b6263d3c 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2117,8 +2117,10 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriverPtr driver, goto cleanup; /* Nothing to do */ - if (niothreads == 0) - return 0; + if (niothreads == 0) { + ret = 0; + goto cleanup; + } if (niothreads != vm->def->iothreads) { virReportError(VIR_ERR_INTERNAL_ERROR,