[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 13/35] block/copy-before-write: drop extra bdrv_unref on failu
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v4 13/35] block/copy-before-write: drop extra bdrv_unref on failure path |
Date: |
Wed, 2 Jun 2021 16:10:46 +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>
Reviewed-by: Max Reitz <mreitz@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.29.2
- [PATCH v4 00/35] block: publish backup-top filter, Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 01/35] block: rename bdrv_replace_child to bdrv_replace_child_tran, Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 02/35] block: comment graph-modifying function not updating permissions, Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 04/35] block: introduce blk_replace_bs, Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 05/35] qdev-properties: PropertyInfo: add realized_set_allowed field, Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 12/35] block/copy-before-write: relax permission requirements when no parents, Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 06/35] qdev: allow setting drive property for realized device, Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 03/35] block: introduce bdrv_replace_child_bs(), Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 07/35] block: rename backup-top to copy-before-write, Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 14/35] block/copy-before-write: use file child instead of backing, Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 13/35] block/copy-before-write: drop extra bdrv_unref on failure path,
Vladimir Sementsov-Ogievskiy <=
- [PATCH v4 08/35] block-copy: always set BDRV_REQ_SERIALISING flag, Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 15/35] block/copy-before-write: bdrv_cbw_append(): replace child at last, Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 16/35] block/copy-before-write: introduce cbw_init(), Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 09/35] block/block-copy: introduce block_copy_set_copy_opts(), Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 17/35] block/copy-before-write: cbw_init(): rename variables, Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 10/35] block/backup: set copy_range and compress after filter insertion, Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 18/35] block/copy-before-write: cbw_init(): use file child after attaching, Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 11/35] block/backup: move cluster size calculation to block-copy, Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 19/35] block/copy-before-write: bdrv_cbw_append(): drop unused compress arg, Vladimir Sementsov-Ogievskiy, 2021/06/02
- [PATCH v4 28/35] iotests/222: fix pylint and mypy complains, Vladimir Sementsov-Ogievskiy, 2021/06/02