提交 6129a04d 编写于 作者: P Peter Krempa

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: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 280aa77e
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册