[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 12/33] block/copy-before-write: drop extra bdrv_unref on failu
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v2 12/33] block/copy-before-write: drop extra bdrv_unref on failure path |
Date: |
Thu, 20 May 2021 17:21:44 +0300 |
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>
---
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.29.2
- [PATCH v2 04/33] block: introduce blk_replace_bs, (continued)
- [PATCH v2 04/33] block: introduce blk_replace_bs, Vladimir Sementsov-Ogievskiy, 2021/05/20
- [PATCH v2 06/33] qdev: allow setting drive property for realized device, Vladimir Sementsov-Ogievskiy, 2021/05/20
- [PATCH v2 10/33] block/backup: move cluster size calculation to block-copy, Vladimir Sementsov-Ogievskiy, 2021/05/20
- [PATCH v2 07/33] block: rename backup-top to copy-before-write, Vladimir Sementsov-Ogievskiy, 2021/05/20
- [PATCH v2 09/33] block-copy: always set BDRV_REQ_SERIALISING flag, Vladimir Sementsov-Ogievskiy, 2021/05/20
- [PATCH v2 08/33] block/backup: drop support for copy_range, Vladimir Sementsov-Ogievskiy, 2021/05/20
- [PATCH v2 11/33] block/copy-before-write: relax permission requirements when no parents, Vladimir Sementsov-Ogievskiy, 2021/05/20
- [PATCH v2 12/33] block/copy-before-write: drop extra bdrv_unref on failure path,
Vladimir Sementsov-Ogievskiy <=
- [PATCH v2 13/33] block/copy-before-write: use file child instead of backing, Vladimir Sementsov-Ogievskiy, 2021/05/20
- [PATCH v2 23/33] python/qemu/machine.py: refactor _qemu_args(), Vladimir Sementsov-Ogievskiy, 2021/05/20
- [PATCH v2 28/33] iotests: move 222 to tests/image-fleecing, Vladimir Sementsov-Ogievskiy, 2021/05/20
- [PATCH v2 14/33] block/copy-before-write: bdrv_cbw_append(): replace child at last, Vladimir Sementsov-Ogievskiy, 2021/05/20
- [PATCH v2 15/33] block/copy-before-write: introduce cbw_init(), Vladimir Sementsov-Ogievskiy, 2021/05/20
- [PATCH v2 16/33] block/copy-before-write: cbw_init(): rename variables, Vladimir Sementsov-Ogievskiy, 2021/05/20