]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
block/blklogwrites: don't care to remove bs->file child on failure
authorVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Tue, 26 Jul 2022 20:11:22 +0000 (23:11 +0300)
committerKevin Wolf <kwolf@redhat.com>
Thu, 27 Oct 2022 18:14:11 +0000 (20:14 +0200)
We don't need to remove bs->file, generic layer takes care of it. No
other driver cares to remove bs->file on failure by hand.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-4-vsementsov@yandex-team.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/blklogwrites.c

index 12b4c3c8cfa07c4fe69ea9d88d5466e4a1bce0ff..cef9efe55d758a1eee75f20598f5a20188723f86 100644 (file)
@@ -254,10 +254,6 @@ fail_log:
         s->log_file = NULL;
     }
 fail:
-    if (ret < 0) {
-        bdrv_unref_child(bs, bs->file);
-        bs->file = NULL;
-    }
     qemu_opts_del(opts);
     return ret;
 }