qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org
Subject: [PULL 4/7] block/backup: drop dead code from backup_job_create
Date: Fri, 25 Oct 2019 15:46:08 +0200	[thread overview]
Message-ID: <20191025134611.25920-5-kwolf@redhat.com> (raw)
In-Reply-To: <20191025134611.25920-1-kwolf@redhat.com>

From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

After commit 00e30f05de1d195, there is no more "goto error" points
after job creation, so after "error:" @job is always NULL and we don't
need roll-back job creation.

Reported-by: Coverity (CID 1406402)
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Acked-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/backup.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/block/backup.c b/block/backup.c
index dddcf77f53..cf62b1a38c 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -474,10 +474,7 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs,
     if (sync_bitmap) {
         bdrv_reclaim_dirty_bitmap(sync_bitmap, NULL);
     }
-    if (job) {
-        backup_clean(&job->common.job);
-        job_early_fail(&job->common.job);
-    } else if (backup_top) {
+    if (backup_top) {
         bdrv_backup_top_drop(backup_top);
     }
 
-- 
2.20.1



  parent reply	other threads:[~2019-10-25 13:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25 13:46 [PULL 0/7] Block layer patches Kevin Wolf
2019-10-25 13:46 ` [PULL 1/7] qapi: add support for blkreplay driver Kevin Wolf
2019-10-25 13:46 ` [PULL 2/7] iotests: Skip read-only cases in 118 when run as root Kevin Wolf
2019-10-25 13:46 ` [PULL 3/7] blockdev: Use error_report() in hmp_commit() Kevin Wolf
2019-10-25 13:46 ` Kevin Wolf [this message]
2019-10-25 13:46 ` [PULL 5/7] doc: Describe missing generic -blockdev options Kevin Wolf
2019-10-25 13:46 ` [PULL 6/7] coroutine: Add qemu_co_mutex_assert_locked() Kevin Wolf
2019-10-25 13:46 ` [PULL 7/7] qcow2: Fix corruption bug in qcow2_detect_metadata_preallocation() Kevin Wolf
2019-10-25 14:57 ` [PULL 0/7] Block layer patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191025134611.25920-5-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).