[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/27] mirror: Fix error path for dirty bitmap creati
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 04/27] mirror: Fix error path for dirty bitmap creation |
Date: |
Tue, 7 Mar 2017 16:40:28 +0100 |
mirror_top_bs must be removed from the graph again when creating the
dirty bitmap fails.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
block/mirror.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/block/mirror.c b/block/mirror.c
index 001b5f0..f24dc51 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -1197,10 +1197,7 @@ static void mirror_start_job(const char *job_id,
BlockDriverState *bs,
s->dirty_bitmap = bdrv_create_dirty_bitmap(bs, granularity, NULL, errp);
if (!s->dirty_bitmap) {
- g_free(s->replaces);
- blk_unref(s->target);
- block_job_unref(&s->common);
- return;
+ goto fail;
}
/* Required permissions are already taken with blk_new() */
--
1.8.3.1
- [Qemu-devel] [PULL 00/27] Block layer fixes for 2.9.0-rc0, Kevin Wolf, 2017/03/07
- [Qemu-devel] [PULL 02/27] mirror: Fix permission problem with 'replaces', Kevin Wolf, 2017/03/07
- [Qemu-devel] [PULL 01/27] commit: Fix error handling, Kevin Wolf, 2017/03/07
- [Qemu-devel] [PULL 03/27] mirror: Fix permissions for removing mirror_top_bs, Kevin Wolf, 2017/03/07
- [Qemu-devel] [PULL 04/27] mirror: Fix error path for dirty bitmap creation,
Kevin Wolf <=
- [Qemu-devel] [PULL 05/27] block: Fix blockdev-snapshot error handling, Kevin Wolf, 2017/03/07
- [Qemu-devel] [PULL 06/27] block: Factor out should_update_child(), Kevin Wolf, 2017/03/07
- [Qemu-devel] [PULL 07/27] block: Factor out bdrv_replace_child_noperm(), Kevin Wolf, 2017/03/07
- [Qemu-devel] [PULL 08/27] block: Ignore multiple children in bdrv_check_update_perm(), Kevin Wolf, 2017/03/07
- [Qemu-devel] [PULL 09/27] block: Handle permission errors in change_parent_backing_link(), Kevin Wolf, 2017/03/07
- [Qemu-devel] [PULL 10/27] block: Fix error handling in bdrv_replace_in_backing_chain(), Kevin Wolf, 2017/03/07
- [Qemu-devel] [PULL 12/27] sheepdog: Fix error handling in sd_snapshot_delete(), Kevin Wolf, 2017/03/07
- [Qemu-devel] [PULL 11/27] sheepdog: Defuse time bomb in sd_open() error handling, Kevin Wolf, 2017/03/07
- [Qemu-devel] [PULL 14/27] sheepdog: Mark sd_snapshot_delete() lossage FIXME, Kevin Wolf, 2017/03/07
- [Qemu-devel] [PULL 13/27] sheepdog: Fix error handling sd_create(), Kevin Wolf, 2017/03/07