[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 04/10] mirror: Fix error path for dirty bitmap creat
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PATCH 04/10] mirror: Fix error path for dirty bitmap creation |
Date: |
Mon, 6 Mar 2017 17:21:56 +0100 |
mirror_top_bs must be removed from the graph again when creating the
dirty bitmap fails.
Signed-off-by: Kevin Wolf <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-block] [PATCH 00/10] block: Op blocker fixes, Kevin Wolf, 2017/03/06
- [Qemu-block] [PATCH 01/10] commit: Fix error handling, Kevin Wolf, 2017/03/06
- [Qemu-block] [PATCH 02/10] mirror: Fix permission problem with 'replaces', Kevin Wolf, 2017/03/06
- [Qemu-block] [PATCH 03/10] mirror: Fix permissions for removing mirror_top_bs, Kevin Wolf, 2017/03/06
- [Qemu-block] [PATCH 04/10] mirror: Fix error path for dirty bitmap creation,
Kevin Wolf <=
- [Qemu-block] [PATCH 05/10] block: Fix blockdev-snapshot error handling, Kevin Wolf, 2017/03/06
- [Qemu-block] [PATCH 06/10] block: Factor out should_update_child(), Kevin Wolf, 2017/03/06
- [Qemu-block] [PATCH 07/10] block: Factor out bdrv_replace_child_noperm(), Kevin Wolf, 2017/03/06
- [Qemu-block] [PATCH 08/10] block: Ignore multiple children in bdrv_check_update_perm(), Kevin Wolf, 2017/03/06