]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuDomainBlockCopyCommon: Don't revoke access to file twice on failure
authorPeter Krempa <pkrempa@redhat.com>
Thu, 10 Apr 2025 14:18:29 +0000 (16:18 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 10 Apr 2025 15:00:27 +0000 (17:00 +0200)
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 <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_driver.c

index 64ed85e8ad7f8a6b7068233c78b2d003f726a02c..3e48da080a294546d60e33758db8c70753a5d964 100644 (file)
@@ -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;