|
|
fbe740 |
From ea4867bfe2c2990f62c3158b875f56dbf540f372 Mon Sep 17 00:00:00 2001
|
|
|
fbe740 |
Message-Id: <ea4867bfe2c2990f62c3158b875f56dbf540f372@dist-git>
|
|
|
fbe740 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
fbe740 |
Date: Tue, 4 Feb 2020 15:08:07 +0100
|
|
|
fbe740 |
Subject: [PATCH] qemuMigrationCookieAddNBD: Remove 'ret' variable and
|
|
|
fbe740 |
'cleanup' label
|
|
|
fbe740 |
MIME-Version: 1.0
|
|
|
fbe740 |
Content-Type: text/plain; charset=UTF-8
|
|
|
fbe740 |
Content-Transfer-Encoding: 8bit
|
|
|
fbe740 |
|
|
|
fbe740 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
fbe740 |
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
fbe740 |
(cherry picked from commit d409411213152d204b85daf05468c4f7f17c1616)
|
|
|
fbe740 |
|
|
|
fbe740 |
https://bugzilla.redhat.com/show_bug.cgi?id=1793263
|
|
|
fbe740 |
Message-Id: <1feef9fdcf0e2f1178e8136192d91a6558cc6149.1580824112.git.pkrempa@redhat.com>
|
|
|
fbe740 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
fbe740 |
---
|
|
|
fbe740 |
src/qemu/qemu_migration_cookie.c | 10 ++++------
|
|
|
fbe740 |
1 file changed, 4 insertions(+), 6 deletions(-)
|
|
|
fbe740 |
|
|
|
fbe740 |
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
|
|
|
fbe740 |
index 968a9b589c..734d95f4f1 100644
|
|
|
fbe740 |
--- a/src/qemu/qemu_migration_cookie.c
|
|
|
fbe740 |
+++ b/src/qemu/qemu_migration_cookie.c
|
|
|
fbe740 |
@@ -456,7 +456,7 @@ qemuMigrationCookieAddNBD(qemuMigrationCookiePtr mig,
|
|
|
fbe740 |
qemuDomainObjPrivatePtr priv = vm->privateData;
|
|
|
fbe740 |
g_autoptr(virHashTable) stats = virHashNew(virHashValueFree);
|
|
|
fbe740 |
size_t i;
|
|
|
fbe740 |
- int ret = -1, rc;
|
|
|
fbe740 |
+ int rc;
|
|
|
fbe740 |
|
|
|
fbe740 |
/* It is not a bug if there already is a NBD data */
|
|
|
fbe740 |
qemuMigrationCookieNBDFree(mig->nbd);
|
|
|
fbe740 |
@@ -473,10 +473,10 @@ qemuMigrationCookieAddNBD(qemuMigrationCookiePtr mig,
|
|
|
fbe740 |
mig->nbd->ndisks = 0;
|
|
|
fbe740 |
|
|
|
fbe740 |
if (qemuDomainObjEnterMonitorAsync(driver, vm, priv->job.asyncJob) < 0)
|
|
|
fbe740 |
- goto cleanup;
|
|
|
fbe740 |
+ return -1;
|
|
|
fbe740 |
rc = qemuMonitorBlockStatsUpdateCapacity(priv->mon, stats, false);
|
|
|
fbe740 |
if (qemuDomainObjExitMonitor(driver, vm) < 0 || rc < 0)
|
|
|
fbe740 |
- goto cleanup;
|
|
|
fbe740 |
+ return -1;
|
|
|
fbe740 |
|
|
|
fbe740 |
for (i = 0; i < vm->def->ndisks; i++) {
|
|
|
fbe740 |
virDomainDiskDefPtr disk = vm->def->disks[i];
|
|
|
fbe740 |
@@ -491,9 +491,7 @@ qemuMigrationCookieAddNBD(qemuMigrationCookiePtr mig,
|
|
|
fbe740 |
mig->nbd->ndisks++;
|
|
|
fbe740 |
}
|
|
|
fbe740 |
|
|
|
fbe740 |
- ret = 0;
|
|
|
fbe740 |
- cleanup:
|
|
|
fbe740 |
- return ret;
|
|
|
fbe740 |
+ return 0;
|
|
|
fbe740 |
}
|
|
|
fbe740 |
|
|
|
fbe740 |
|
|
|
fbe740 |
--
|
|
|
fbe740 |
2.25.0
|
|
|
fbe740 |
|