[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 31/56] block/copy-before-write: drop extra bdrv_unref on failure p
From: |
Hanna Reitz |
Subject: |
[PULL 31/56] block/copy-before-write: drop extra bdrv_unref on failure path |
Date: |
Wed, 1 Sep 2021 17:15:54 +0200 |
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
bdrv_attach_child() do bdrv_unref() on failure, so we shouldn't do it
by hand here.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210824083856.17408-12-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
---
block/copy-before-write.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/block/copy-before-write.c b/block/copy-before-write.c
index 2a51cc64e4..945d9340f4 100644
--- a/block/copy-before-write.c
+++ b/block/copy-before-write.c
@@ -201,7 +201,6 @@ BlockDriverState *bdrv_cbw_append(BlockDriverState *source,
state->target = bdrv_attach_child(top, target, "target", &child_of_bds,
BDRV_CHILD_DATA, errp);
if (!state->target) {
- bdrv_unref(target);
bdrv_unref(top);
return NULL;
}
--
2.31.1
- [PULL 19/56] iotests: use with-statement for open() calls, (continued)
- [PULL 19/56] iotests: use with-statement for open() calls, Hanna Reitz, 2021/09/01
- [PULL 21/56] block: introduce bdrv_replace_child_bs(), Hanna Reitz, 2021/09/01
- [PULL 20/56] iotests: use subprocess.DEVNULL instead of open("/dev/null"), Hanna Reitz, 2021/09/01
- [PULL 23/56] qdev-properties: PropertyInfo: add realized_set_allowed field, Hanna Reitz, 2021/09/01
- [PULL 22/56] block: introduce blk_replace_bs, Hanna Reitz, 2021/09/01
- [PULL 24/56] qdev: allow setting drive property for realized device, Hanna Reitz, 2021/09/01
- [PULL 25/56] block: rename backup-top to copy-before-write, Hanna Reitz, 2021/09/01
- [PULL 26/56] block-copy: move detecting fleecing scheme to block-copy, Hanna Reitz, 2021/09/01
- [PULL 28/56] block/backup: set copy_range and compress after filter insertion, Hanna Reitz, 2021/09/01
- [PULL 27/56] block/block-copy: introduce block_copy_set_copy_opts(), Hanna Reitz, 2021/09/01
- [PULL 31/56] block/copy-before-write: drop extra bdrv_unref on failure path,
Hanna Reitz <=
- [PULL 29/56] block/backup: move cluster size calculation to block-copy, Hanna Reitz, 2021/09/01
- [PULL 33/56] block/copy-before-write: bdrv_cbw_append(): replace child at last, Hanna Reitz, 2021/09/01
- [PULL 30/56] block/copy-before-write: relax permission requirements when no parents, Hanna Reitz, 2021/09/01
- [PULL 32/56] block/copy-before-write: use file child instead of backing, Hanna Reitz, 2021/09/01
- [PULL 36/56] block/copy-before-write: cbw_init(): use file child after attaching, Hanna Reitz, 2021/09/01
- [PULL 37/56] block/copy-before-write: bdrv_cbw_append(): drop unused compress arg, Hanna Reitz, 2021/09/01
- [PULL 35/56] block/copy-before-write: cbw_init(): rename variables, Hanna Reitz, 2021/09/01
- [PULL 38/56] block/copy-before-write: cbw_init(): use options, Hanna Reitz, 2021/09/01
- [PULL 40/56] block/block-copy: make setting progress optional, Hanna Reitz, 2021/09/01
- [PULL 41/56] block/copy-before-write: make public block driver, Hanna Reitz, 2021/09/01