mirror of
https://github.com/mii443/qemu.git
synced 2025-12-09 05:58:32 +00:00
block: Mark bdrv_unref_child() GRAPH_WRLOCK
Instead of taking the writer lock internally, require callers to already hold it when calling bdrv_unref_child(). These callers will typically already hold the graph lock once the locking work is completed, which means that they can't call functions that take it internally. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-ID: <20230911094620.45040-21-kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
@@ -225,7 +225,12 @@ void bdrv_ref(BlockDriverState *bs);
|
||||
void no_coroutine_fn bdrv_unref(BlockDriverState *bs);
|
||||
void coroutine_fn no_co_wrapper bdrv_co_unref(BlockDriverState *bs);
|
||||
void GRAPH_WRLOCK bdrv_schedule_unref(BlockDriverState *bs);
|
||||
void bdrv_unref_child(BlockDriverState *parent, BdrvChild *child);
|
||||
|
||||
void GRAPH_WRLOCK
|
||||
bdrv_unref_child(BlockDriverState *parent, BdrvChild *child);
|
||||
|
||||
void coroutine_fn no_co_wrapper_bdrv_wrlock
|
||||
bdrv_co_unref_child(BlockDriverState *parent, BdrvChild *child);
|
||||
|
||||
BdrvChild * GRAPH_WRLOCK
|
||||
bdrv_attach_child(BlockDriverState *parent_bs,
|
||||
|
||||
Reference in New Issue
Block a user