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