[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/25] block: Inline bdrv_set_backing_noperm()
|
From: |
Kevin Wolf |
|
Subject: |
[PULL 14/25] block: Inline bdrv_set_backing_noperm() |
|
Date: |
Tue, 7 Nov 2023 19:45:54 +0100 |
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>
---
block.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/block.c b/block.c
index d79a6f41f9..dc43e36f69 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;
}
--
2.41.0
- [PULL 12/25] block: Mark bdrv_cow_child() and callers GRAPH_RDLOCK, (continued)
- [PULL 12/25] block: Mark bdrv_cow_child() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/11/07
- [PULL 09/25] block: Mark bdrv_(un)freeze_backing_chain() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/11/07
- [PULL 10/25] block: Mark bdrv_chain_contains() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/11/07
- [PULL 05/25] block: Mark block_job_add_bdrv() GRAPH_WRLOCK, Kevin Wolf, 2023/11/07
- [PULL 06/25] block: Mark bdrv_filter_or_cow_bs() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/11/07
- [PULL 13/25] block: Mark bdrv_set_backing_hd_drained() GRAPH_WRLOCK, Kevin Wolf, 2023/11/07
- [PULL 23/25] block: Take graph lock for most of .bdrv_open, Kevin Wolf, 2023/11/07
- [PULL 17/25] block: Protect bs->backing with graph_lock, Kevin Wolf, 2023/11/07
- [PULL 22/25] vhdx: Take locks for accessing bs->file, Kevin Wolf, 2023/11/07
- [PULL 08/25] block: Mark bdrv_skip_filters() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/11/07
- [PULL 14/25] block: Inline bdrv_set_backing_noperm(),
Kevin Wolf <=
- [PULL 18/25] blkverify: Add locking for request_fn, Kevin Wolf, 2023/11/07
- [PULL 16/25] block: Mark bdrv_replace_node() GRAPH_WRLOCK, Kevin Wolf, 2023/11/07
- [PULL 15/25] block: Mark bdrv_replace_node_common() GRAPH_WRLOCK, Kevin Wolf, 2023/11/07
- [PULL 21/25] qcow2: Take locks for accessing bs->file, Kevin Wolf, 2023/11/07
- [PULL 20/25] block: Add missing GRAPH_RDLOCK annotations, Kevin Wolf, 2023/11/07
- [PULL 25/25] hw/ide/ahci: trigger either error IRQ or regular IRQ, not both, Kevin Wolf, 2023/11/07
- [PULL 19/25] block: Introduce bdrv_co_change_backing_file(), Kevin Wolf, 2023/11/07
- Re: [PULL 00/25] Block layer patches, Stefan Hajnoczi, 2023/11/07