99cbc7
From 624a93ae0bd5d4a11223d5704722d0095d88c28c Mon Sep 17 00:00:00 2001
99cbc7
Message-Id: <624a93ae0bd5d4a11223d5704722d0095d88c28c@dist-git>
99cbc7
From: Peter Krempa <pkrempa@redhat.com>
99cbc7
Date: Thu, 11 Apr 2019 15:14:14 -0400
99cbc7
Subject: [PATCH] qemu: hotplug: Don't generate alias when detaching
99cbc7
 controllers
99cbc7
99cbc7
qemuDomainDetachControllerDevice contained code which implied that alias
99cbc7
might be NULL when detaching the disk and tried to generate it. This is
99cbc7
no longer possible so we can remove the code.
99cbc7
99cbc7
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
99cbc7
Reviewed-by: John Ferlan <jferlan@redhat.com>
99cbc7
(cherry picked from commit c86735e2d85bf0e7ce8e08ce0b24d5627020ab0e)
99cbc7
99cbc7
Partially-Resolves: https://bugzilla.redhat.com/1658198
99cbc7
Signed-off-by: Laine Stump <laine@redhat.com>
99cbc7
Signed-off-by: Laine Stump <laine@laine.org>
99cbc7
Message-Id: <20190411191453.24055-3-laine@redhat.com>
99cbc7
Acked-by: Michal Privoznik <mprivozn@redhat.com>
99cbc7
---
99cbc7
 src/qemu/qemu_hotplug.c | 5 -----
99cbc7
 1 file changed, 5 deletions(-)
99cbc7
99cbc7
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
99cbc7
index 15d845e7b8..5e11e1997a 100644
99cbc7
--- a/src/qemu/qemu_hotplug.c
99cbc7
+++ b/src/qemu/qemu_hotplug.c
99cbc7
@@ -4912,11 +4912,6 @@ int qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,
99cbc7
         goto cleanup;
99cbc7
     }
99cbc7
 
99cbc7
-    if (!detach->info.alias) {
99cbc7
-        if (qemuAssignDeviceControllerAlias(vm->def, priv->qemuCaps, detach) < 0)
99cbc7
-            goto cleanup;
99cbc7
-    }
99cbc7
-
99cbc7
     if (!async)
99cbc7
         qemuDomainMarkDeviceForRemoval(vm, &detach->info);
99cbc7
 
99cbc7
-- 
99cbc7
2.21.0
99cbc7