Use qemuDomainStorageSourceAccessModify instead of the individual calls.

Signed-off-by: Peter Krempa <pkre...@redhat.com>
---
 src/qemu/qemu_domain.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 30acba3c47..f7d1250f09 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -9332,18 +9332,9 @@ qemuDomainStorageSourceAccessRevoke(virQEMUDriverPtr 
driver,
                                     virDomainObjPtr vm,
                                     virStorageSourcePtr elem)
 {
-    if (qemuTeardownImageCgroup(vm, elem) < 0)
-        VIR_WARN("Failed to teardown cgroup for disk path %s",
-                 NULLSTR(elem->path));
+    qemuDomainStorageSourceAccessFlags flags = 
QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_REVOKE;

-    if (qemuSecurityRestoreImageLabel(driver, vm, elem, false) < 0)
-        VIR_WARN("Unable to restore security label on %s", 
NULLSTR(elem->path));
-
-    if (qemuDomainNamespaceTeardownDisk(vm, elem) < 0)
-        VIR_WARN("Unable to remove /dev entry for %s", NULLSTR(elem->path));
-
-    if (virDomainLockImageDetach(driver->lockManager, vm, elem) < 0)
-        VIR_WARN("Unable to release lock on %s", NULLSTR(elem->path));
+    ignore_value(qemuDomainStorageSourceAccessModify(driver, vm, elem, flags));
 }


-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to