|
|
c480ed |
From fa5cf4f38c5310ac24adf2011777c21827c3a727 Mon Sep 17 00:00:00 2001
|
|
|
c480ed |
Message-Id: <fa5cf4f38c5310ac24adf2011777c21827c3a727@dist-git>
|
|
|
c480ed |
From: Andrea Bolognani <abologna@redhat.com>
|
|
|
c480ed |
Date: Tue, 11 Jun 2019 10:55:05 +0200
|
|
|
c480ed |
Subject: [PATCH] qemu: Drop cleanup label from qemuProcessInitCpuAffinity()
|
|
|
c480ed |
MIME-Version: 1.0
|
|
|
c480ed |
Content-Type: text/plain; charset=UTF-8
|
|
|
c480ed |
Content-Transfer-Encoding: 8bit
|
|
|
c480ed |
|
|
|
c480ed |
We're using VIR_AUTOPTR() for everything now, plus the
|
|
|
c480ed |
cleanup section was not doing anything useful anyway.
|
|
|
c480ed |
|
|
|
c480ed |
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
|
c480ed |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
c480ed |
(cherry picked from commit de563ebcf9d72e5815933a0d715aa9c462bf50cc)
|
|
|
c480ed |
|
|
|
c480ed |
https://bugzilla.redhat.com/show_bug.cgi?id=1716908
|
|
|
c480ed |
|
|
|
c480ed |
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
|
c480ed |
Message-Id: <20190611085506.12564-6-abologna@redhat.com>
|
|
|
c480ed |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
c480ed |
---
|
|
|
c480ed |
src/qemu/qemu_process.c | 18 ++++++++----------
|
|
|
c480ed |
1 file changed, 8 insertions(+), 10 deletions(-)
|
|
|
c480ed |
|
|
|
c480ed |
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
|
|
c480ed |
index 0b2b7964e1..d0945b9c65 100644
|
|
|
c480ed |
--- a/src/qemu/qemu_process.c
|
|
|
c480ed |
+++ b/src/qemu/qemu_process.c
|
|
|
c480ed |
@@ -2356,7 +2356,6 @@ qemuProcessGetAllCpuAffinity(virBitmapPtr *cpumapRet)
|
|
|
c480ed |
static int
|
|
|
c480ed |
qemuProcessInitCpuAffinity(virDomainObjPtr vm)
|
|
|
c480ed |
{
|
|
|
c480ed |
- int ret = -1;
|
|
|
c480ed |
VIR_AUTOPTR(virBitmap) cpumapToSet = NULL;
|
|
|
c480ed |
virDomainNumatuneMemMode mem_mode;
|
|
|
c480ed |
qemuDomainObjPrivatePtr priv = vm->privateData;
|
|
|
c480ed |
@@ -2387,25 +2386,24 @@ qemuProcessInitCpuAffinity(virDomainObjPtr vm)
|
|
|
c480ed |
priv->autoNodeset,
|
|
|
c480ed |
&nodeset,
|
|
|
c480ed |
-1) < 0)
|
|
|
c480ed |
- goto cleanup;
|
|
|
c480ed |
+ return -1;
|
|
|
c480ed |
|
|
|
c480ed |
if (virNumaNodesetToCPUset(nodeset, &cpumapToSet) < 0)
|
|
|
c480ed |
- goto cleanup;
|
|
|
c480ed |
+ return -1;
|
|
|
c480ed |
} else if (vm->def->cputune.emulatorpin) {
|
|
|
c480ed |
if (virBitmapCopy(cpumapToSet, vm->def->cputune.emulatorpin) < 0)
|
|
|
c480ed |
- goto cleanup;
|
|
|
c480ed |
+ return -1;
|
|
|
c480ed |
} else {
|
|
|
c480ed |
if (qemuProcessGetAllCpuAffinity(&cpumapToSet) < 0)
|
|
|
c480ed |
- goto cleanup;
|
|
|
c480ed |
+ return -1;
|
|
|
c480ed |
}
|
|
|
c480ed |
|
|
|
c480ed |
if (cpumapToSet &&
|
|
|
c480ed |
- virProcessSetAffinity(vm->pid, cpumapToSet) < 0)
|
|
|
c480ed |
- goto cleanup;
|
|
|
c480ed |
+ virProcessSetAffinity(vm->pid, cpumapToSet) < 0) {
|
|
|
c480ed |
+ return -1;
|
|
|
c480ed |
+ }
|
|
|
c480ed |
|
|
|
c480ed |
- ret = 0;
|
|
|
c480ed |
- cleanup:
|
|
|
c480ed |
- return ret;
|
|
|
c480ed |
+ return 0;
|
|
|
c480ed |
}
|
|
|
c480ed |
|
|
|
c480ed |
/* set link states to down on interfaces at qemu start */
|
|
|
c480ed |
--
|
|
|
c480ed |
2.22.0
|
|
|
c480ed |
|