]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
block: remove bdrv_coroutine_enter
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 15 Dec 2022 13:02:24 +0000 (14:02 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 24 Jan 2023 17:26:41 +0000 (18:26 +0100)
It has only one caller---inline it and remove the function.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221215130225.476477-2-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/block-backend.c
include/block/block-io.h

diff --git a/block.c b/block.c
index b4a89207ad2d1c4d64bfaf56ee10b5d45193530c..ad92fdf1b3ddad1c81fadb41c9e2e33508f11a70 100644 (file)
--- a/block.c
+++ b/block.c
@@ -7178,12 +7178,6 @@ void coroutine_fn bdrv_co_unlock(BlockDriverState *bs)
     }
 }
 
-void bdrv_coroutine_enter(BlockDriverState *bs, Coroutine *co)
-{
-    IO_CODE();
-    aio_co_enter(bdrv_get_aio_context(bs), co);
-}
-
 static void bdrv_do_remove_aio_context_notifier(BdrvAioNotifier *ban)
 {
     GLOBAL_STATE_CODE();
index ba7bf1d6bc1f35304efdffa02e53bcab6a767b3a..8fbb787f41ee21d3cc7f5d89099de99efc909e2d 100644 (file)
@@ -1555,7 +1555,7 @@ static BlockAIOCB *blk_aio_prwv(BlockBackend *blk, int64_t offset,
     acb->has_returned = false;
 
     co = qemu_coroutine_create(co_entry, acb);
-    bdrv_coroutine_enter(blk_bs(blk), co);
+    aio_co_enter(blk_get_aio_context(blk), co);
 
     acb->has_returned = true;
     if (acb->rwco.ret != NOT_DONE) {
index 339835159691fa373f19fb9f0c504968988edf65..8d571ec2fba3469526a7bbceefd2af0bf78f0880 100644 (file)
@@ -213,11 +213,6 @@ AioContext *coroutine_fn bdrv_co_enter(BlockDriverState *bs);
  */
 void coroutine_fn bdrv_co_leave(BlockDriverState *bs, AioContext *old_ctx);
 
-/**
- * Transfer control to @co in the aio context of @bs
- */
-void bdrv_coroutine_enter(BlockDriverState *bs, Coroutine *co);
-
 AioContext *child_of_bds_get_parent_aio_context(BdrvChild *c);
 
 void bdrv_io_plug(BlockDriverState *bs);