dd->src is always allocated in this function as it contains the new
source for the snapshot which is meant to replace the disk source.

The label handling code executed if that source was not present thus is
dead code. Remove it.

Signed-off-by: Peter Krempa <[email protected]>
---
 src/qemu/qemu_driver.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index b6fbb197b8..913b57855c 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -15421,13 +15421,6 @@ qemuDomainSnapshotUpdateDiskSources(virQEMUDriverPtr 
driver,
                                     virDomainObjPtr vm,
                                     qemuDomainSnapshotDiskDataPtr dd)
 {
-    if (!dd->src) {
-        /* Remove old metadata */
-        if (qemuSecurityMoveImageMetadata(driver, vm, dd->disk->src, NULL) < 0)
-            VIR_WARN("Unable to remove disk metadata on vm %s", vm->def->name);
-        return;
-    }
-
     /* storage driver access won'd be needed */
     if (dd->initialized)
         virStorageFileDeinit(dd->src);
-- 
2.21.0

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to