aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2019-06-12 18:42:34 +0200
committerKevin Wolf <kwolf@redhat.com>2020-09-07 12:31:30 +0200
commit9ee413cb561092e2db2ba5a7110282a36fb9fd25 (patch)
treec9188ed93141e3ea5223c6a16ab14d39f7c7779f
parent34778172f1eb75796c8af9fae8d88b889cff4fd2 (diff)
block: bdrv_set_backing_hd() is about bs->backing
bdrv_set_backing_hd() is a function that explicitly cares about the bs->backing child. Highlight that in its description and use child_bs(bs->backing) instead of backing_bs(bs) to make it more obvious. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--block.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block.c b/block.c
index 656baa521e..e8d09d46ec 100644
--- a/block.c
+++ b/block.c
@@ -2863,7 +2863,7 @@ static BdrvChildRole bdrv_backing_role(BlockDriverState *bs)
}
/*
- * Sets the backing file link of a BDS. A new reference is created; callers
+ * Sets the bs->backing link of a BDS. A new reference is created; callers
* which don't need their own reference any more must call bdrv_unref().
*/
void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd,
@@ -2872,7 +2872,7 @@ void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd,
bool update_inherits_from = bdrv_chain_contains(bs, backing_hd) &&
bdrv_inherits_from_recursive(backing_hd, bs);
- if (bdrv_is_backing_chain_frozen(bs, backing_bs(bs), errp)) {
+ if (bdrv_is_backing_chain_frozen(bs, child_bs(bs->backing), errp)) {
return;
}