aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2023-10-27 17:53:23 +0200
committerKevin Wolf <kwolf@redhat.com>2023-11-07 19:14:20 +0100
commit3204c2e33b6fb77897756bdd8639913f02647300 (patch)
tree1f438740978b3aab833f1280f990179cddd750c3 /block.c
parentd0f9fd94d92c15c6ab7f6b8855acd812b80dbbaa (diff)
downloadqemu-3204c2e33b6fb77897756bdd8639913f02647300.zip
qemu-3204c2e33b6fb77897756bdd8639913f02647300.tar.gz
qemu-3204c2e33b6fb77897756bdd8639913f02647300.tar.bz2
block: Inline bdrv_set_backing_noperm()
It's only a single line and has a single caller. Inlining makes things a bit easier to follow. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-ID: <20231027155333.420094-15-kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/block.c b/block.c
index d79a6f4..dc43e36 100644
--- a/block.c
+++ b/block.c
@@ -3532,19 +3532,7 @@ out:
*
* If a backing child is already present (i.e. we're detaching a node), that
* child node must be drained.
- *
- * After calling this function, the transaction @tran may only be completed
- * while holding a writer lock for the graph.
*/
-static int GRAPH_WRLOCK
-bdrv_set_backing_noperm(BlockDriverState *bs,
- BlockDriverState *backing_hd,
- Transaction *tran, Error **errp)
-{
- GLOBAL_STATE_CODE();
- return bdrv_set_file_or_backing_noperm(bs, backing_hd, true, tran, errp);
-}
-
int bdrv_set_backing_hd_drained(BlockDriverState *bs,
BlockDriverState *backing_hd,
Error **errp)
@@ -3558,7 +3546,7 @@ int bdrv_set_backing_hd_drained(BlockDriverState *bs,
assert(bs->backing->bs->quiesce_counter > 0);
}
- ret = bdrv_set_backing_noperm(bs, backing_hd, tran, errp);
+ ret = bdrv_set_file_or_backing_noperm(bs, backing_hd, true, tran, errp);
if (ret < 0) {
goto out;
}