From: Peter Krempa Date: Thu, 10 Apr 2025 14:18:29 +0000 (+0200) Subject: qemuDomainBlockCopyCommon: Don't revoke access to file twice on failure X-Git-Tag: v11.3.0-rc1~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=68a83cac64b90b7069e6213d70a2faadb552cb80;p=thirdparty%2Flibvirt.git qemuDomainBlockCopyCommon: Don't revoke access to file twice on failure If the copy job fails to start up when calling the 'blockdev-mirror' command the code would call qemuDomainStorageSourceChainAccessRevoke() twice; once right after the monitor call and the second time in the 'endjob' section. Remove the one directly after the monitor call and let the common cleanup handle 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 64ed85e8ad..3e48da080a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14500,10 +14500,8 @@ qemuDomainBlockCopyCommon(virDomainObj *vm, virDomainAuditDisk(vm, NULL, mirror, "mirror", ret >= 0); qemuDomainObjExitMonitor(vm); - if (ret < 0) { - qemuDomainStorageSourceChainAccessRevoke(driver, vm, mirror); + if (ret < 0) goto endjob; - } /* Update vm in place to match changes. */ need_unlink = false;