From nobody Fri Nov 1 04:25:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=openvz.org Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1648710783227249.47668049979745; Thu, 31 Mar 2022 00:13:03 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-211-rbfYhkRwNFyRAS7DImSfrw-1; Thu, 31 Mar 2022 03:12:28 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D4AB8804190; Thu, 31 Mar 2022 07:12:25 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9AEC040CF8F2; Thu, 31 Mar 2022 07:12:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A48861947BBD; Thu, 31 Mar 2022 07:12:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 888D519451F3 for ; Thu, 31 Mar 2022 07:12:22 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7B54740CF8F2; Thu, 31 Mar 2022 07:12:22 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast08.extmail.prod.ext.rdu2.redhat.com [10.11.55.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 76FDB40CF917 for ; Thu, 31 Mar 2022 07:12:22 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5E1633804513 for ; Thu, 31 Mar 2022 07:12:22 +0000 (UTC) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-336-nQeB96SmNx6KSgrmKUMRpw-1; Thu, 31 Mar 2022 03:12:17 -0400 Received: by mail-lf1-f50.google.com with SMTP id w7so39834055lfd.6 for ; Thu, 31 Mar 2022 00:12:17 -0700 (PDT) Received: from vzbook.. (broadband-90-154-71-96.ip.moscow.rt.ru. [90.154.71.96]) by smtp.gmail.com with ESMTPSA id s6-20020ac25fa6000000b0044313e88020sm2585169lfe.202.2022.03.31.00.12.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Mar 2022 00:12:15 -0700 (PDT) X-MC-Unique: rbfYhkRwNFyRAS7DImSfrw-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: nQeB96SmNx6KSgrmKUMRpw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fw/4GD3l6t61DigQej+KQqF3n96PGc4QKPUXJZJqPus=; b=iisnNvwAjn3z0ktFgqucCMXfs19b3UnDb/GGv02exDeQHDRGxvKdoS2UF3/dB7BBIB 3uyO/M30L01oHSMUsIQnqu5VtVbiGGlWO25OhYWIf7qnQDTEbaJ/MQPETQjylDAKYz4H wVNPS+FIRJLuvrmFFVcbwzjo+0BiRRPhUI47CAq/yohYP+9rfz+TxNJvdyHY5UlyC+NN p1daR6EsAlbIEEBlFsug6S0hQ8peVrNkpcPMO+bDQ42GbIF//3avQSCM9LKyDvOGVyft N0WzLRRm6U9YTwVKcjFvt9pMLdYqu4OLocunLXuqrrwALOvE9ZVINXAtt7rdqp8lvrG7 pWCA== X-Gm-Message-State: AOAM533Q62Dv9uDZEt1Dz/DmV1woAeGkElMtNy1FymiiM7U6/up2SZCT 0tT+Eo7AjCGp/uIgEikJ+e+3pPQr1IanfQ== X-Google-Smtp-Source: ABdhPJxBNwBcbm7A/qx6FigLOeys201VySMKX+okDURBiQQuZ0AZsujYZQxEANb7oo77STnBMyLwJw== X-Received: by 2002:a05:6512:3b0e:b0:44a:547d:c8b8 with SMTP id f14-20020a0565123b0e00b0044a547dc8b8mr9879167lfv.373.1648710735833; Thu, 31 Mar 2022 00:12:15 -0700 (PDT) From: Nikolay Shirokovskiy To: libvir-list@redhat.com Subject: [PATCH v2 REBASE 3/3] qemu: remove unnecessary gotos in qemuSnapshotCreateActiveInternal Date: Thu, 31 Mar 2022 10:11:11 +0300 Message-Id: <20220331071111.332231-4-nikolay.shirokovskiy@openvz.org> In-Reply-To: <20220331071111.332231-1-nikolay.shirokovskiy@openvz.org> References: <20220331071111.332231-1-nikolay.shirokovskiy@openvz.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1648710785452100002 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_snapshot.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index df9da4613f..5d622592c3 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -297,21 +297,19 @@ qemuSnapshotCreateActiveInternal(virQEMUDriver *drive= r, int ret =3D -1; =20 if (!qemuMigrationSrcIsAllowed(driver, vm, false, 0)) - goto cleanup; + return -1; =20 if (halt) { if (qemuProcessStopCPUs(driver, vm, VIR_DOMAIN_PAUSED_SAVE, VIR_ASYNC_JOB_SNAPSHOT) < 0) - goto cleanup; + return -1; =20 resume =3D true; } =20 if (qemuDomainObjEnterMonitorAsync(driver, vm, - VIR_ASYNC_JOB_SNAPSHOT) < 0) { - resume =3D false; - goto cleanup; - } + VIR_ASYNC_JOB_SNAPSHOT) < 0) + return -1; =20 ret =3D qemuMonitorCreateSnapshot(priv->mon, snap->def->name); qemuDomainObjExitMonitor(vm); --=20 2.35.1