[PATCH 05/13] qemu: snapshot: Remove unused cleanup section in qemuDomainSnapshotCreateSingleDiskActive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After getting rid of pre-transaction qemu support the cleanup section is
unused.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_driver.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index fad96053db..97f7ad16bf 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -15197,31 +15197,26 @@ qemuDomainSnapshotCreateSingleDiskActive(virQEMUDriverPtr driver,
                                          virJSONValuePtr actions,
                                          bool reuse)
 {
-    int ret = -1;
-
     if (qemuBlockSnapshotAddLegacy(actions, dd->disk, dd->src, reuse) < 0)
-        goto cleanup;
+        return -1;

     /* pre-create the image file so that we can label it before handing it to qemu */
     if (!reuse && dd->src->type != VIR_STORAGE_TYPE_BLOCK) {
         if (virStorageFileCreate(dd->src) < 0) {
             virReportSystemError(errno, _("failed to create image file '%s'"),
                                  NULLSTR(dd->src->path));
-            goto cleanup;
+            return -1;
         }
         dd->created = true;
     }

     /* set correct security, cgroup and locking options on the new image */
     if (qemuDomainStorageSourceAccessAllow(driver, vm, dd->src, false, true) < 0)
-        goto cleanup;
+        return -1;

     dd->prepared = true;

-    ret = 0;
-
- cleanup:
-    return ret;
+    return 0;
 }


-- 
2.21.0

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux