From: Peter Krempa Date: Mon, 12 Aug 2019 10:16:35 +0000 (+0200) Subject: qemu: driver: Remove dead code from qemuDomainSnapshotUpdateDiskSources X-Git-Tag: v5.7.0-rc1~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6129a04d49926e31c983a8a5636741c8ccc8364e;p=thirdparty%2Flibvirt.git qemu: driver: Remove dead code from qemuDomainSnapshotUpdateDiskSources 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 Reviewed-by: Ján Tomko --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 87a3a13ef8..6e3bab904a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -15407,13 +15407,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);