block: rename bdrv_replace_child_safe() to bdrv_replace_child()

We don't have bdrv_replace_child(), so it's time for
bdrv_replace_child_safe() to take its place.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20210428151804.439460-36-vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Vladimir Sementsov-Ogievskiy 2021-04-28 18:18:03 +03:00 committed by Kevin Wolf
parent ecb776bd93
commit 2fe5ff56f1

10
block.c
View file

@ -2248,12 +2248,12 @@ static TransactionActionDrv bdrv_replace_child_drv = {
};
/*
* bdrv_replace_child_safe
* bdrv_replace_child
*
* Note: real unref of old_bs is done only on commit.
*/
static void bdrv_replace_child_safe(BdrvChild *child, BlockDriverState *new_bs,
Transaction *tran)
static void bdrv_replace_child(BdrvChild *child, BlockDriverState *new_bs,
Transaction *tran)
{
BdrvReplaceChildState *s = g_new(BdrvReplaceChildState, 1);
*s = (BdrvReplaceChildState) {
@ -4803,7 +4803,7 @@ static void bdrv_remove_filter_or_cow_child(BlockDriverState *bs,
}
if (child->bs) {
bdrv_replace_child_safe(child, NULL, tran);
bdrv_replace_child(child, NULL, tran);
}
s = g_new(BdrvRemoveFilterOrCowChild, 1);
@ -4843,7 +4843,7 @@ static int bdrv_replace_node_noperm(BlockDriverState *from,
c->name, from->node_name);
return -EPERM;
}
bdrv_replace_child_safe(c, to, tran);
bdrv_replace_child(c, to, tran);
}
return 0;