From: Vladimir Sementsov-Ogievskiy Date: Tue, 26 Jul 2022 20:11:22 +0000 (+0300) Subject: block/blklogwrites: don't care to remove bs->file child on failure X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a987aa7d3c70a2f7d2e052c1e8e449fcd35c3f78;p=people%2Fpauldu%2Fqemu.git 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 Reviewed-by: Hanna Reitz Message-Id: <20220726201134.924743-4-vsementsov@yandex-team.ru> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- 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; }