|
|
9119d9 |
From 1c369e232e7a9a7e631cbb059182b14c6fdea845 Mon Sep 17 00:00:00 2001
|
|
|
9119d9 |
Message-Id: <1c369e232e7a9a7e631cbb059182b14c6fdea845@dist-git>
|
|
|
9119d9 |
From: Martin Kletzander <mkletzan@redhat.com>
|
|
|
9119d9 |
Date: Wed, 21 Jan 2015 17:22:05 +0100
|
|
|
9119d9 |
Subject: [PATCH] qemu: Add missing goto error in qemuRestoreCgroupState
|
|
|
9119d9 |
|
|
|
9119d9 |
https://bugzilla.redhat.com/show_bug.cgi?id=1161540
|
|
|
9119d9 |
|
|
|
9119d9 |
Commit af2a1f05 tried clearly separating each condition in
|
|
|
9119d9 |
qemuRestoreCgroupState() for the sake of readability, however somehow
|
|
|
9119d9 |
one condition body was missing. That means that the body of the next
|
|
|
9119d9 |
condition got executed only if both of there were true, which is
|
|
|
9119d9 |
impossible, thus resulting in a dead code and a logic error.
|
|
|
9119d9 |
|
|
|
9119d9 |
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
9119d9 |
(cherry picked from commit 86759ec61a77f545f9238d83adbfaa16d85fa830)
|
|
|
9119d9 |
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
9119d9 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
9119d9 |
---
|
|
|
9119d9 |
src/qemu/qemu_cgroup.c | 4 +---
|
|
|
9119d9 |
1 file changed, 1 insertion(+), 3 deletions(-)
|
|
|
9119d9 |
|
|
|
9119d9 |
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
|
|
|
9119d9 |
index 0a4576a..8824426 100644
|
|
|
9119d9 |
--- a/src/qemu/qemu_cgroup.c
|
|
|
9119d9 |
+++ b/src/qemu/qemu_cgroup.c
|
|
|
9119d9 |
@@ -796,9 +796,7 @@ qemuRestoreCgroupState(virDomainObjPtr vm)
|
|
|
9119d9 |
goto error;
|
|
|
9119d9 |
|
|
|
9119d9 |
if ((empty = virCgroupHasEmptyTasks(priv->cgroup,
|
|
|
9119d9 |
- VIR_CGROUP_CONTROLLER_CPUSET)) < 0)
|
|
|
9119d9 |
-
|
|
|
9119d9 |
- if (!empty)
|
|
|
9119d9 |
+ VIR_CGROUP_CONTROLLER_CPUSET)) <= 0)
|
|
|
9119d9 |
goto error;
|
|
|
9119d9 |
|
|
|
9119d9 |
if (virCgroupSetCpusetMems(priv->cgroup, mem_mask) < 0)
|
|
|
9119d9 |
--
|
|
|
9119d9 |
2.2.1
|
|
|
9119d9 |
|