summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy2022-07-26 22:11:22 +0200
committerKevin Wolf2022-10-27 20:14:11 +0200
commita987aa7d3c70a2f7d2e052c1e8e449fcd35c3f78 (patch)
treea09a3f22e6c72c9f6d0f0b5c5b43a2cb2b41ec0e /block
parentblock: introduce bdrv_open_file_child() helper (diff)
downloadqemu-a987aa7d3c70a2f7d2e052c1e8e449fcd35c3f78.tar.gz
qemu-a987aa7d3c70a2f7d2e052c1e8e449fcd35c3f78.tar.xz
qemu-a987aa7d3c70a2f7d2e052c1e8e449fcd35c3f78.zip
block/blklogwrites: don't care to remove bs->file child on failure
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>
Diffstat (limited to 'block')
-rw-r--r--block/blklogwrites.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/block/blklogwrites.c b/block/blklogwrites.c
index 12b4c3c8cf..cef9efe55d 100644
--- a/block/blklogwrites.c
+++ b/block/blklogwrites.c
@@ -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;
}