From 263d5e12c30fa0e6916494ea5f7afc2ab129c06f Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Thu, 9 Mar 2023 14:08:53 -0500 Subject: [PATCH] block: convert bdrv_drain_all_begin() to AIO_WAIT_WHILE_UNLOCKED() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the AioContext argument was already NULL, AIO_WAIT_WHILE() was never going to unlock the AioContext. Therefore it is possible to replace AIO_WAIT_WHILE() with AIO_WAIT_WHILE_UNLOCKED(). Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi Message-Id: <20230309190855.414275-5-stefanha@redhat.com> Reviewed-by: Wilfred Mallawa Signed-off-by: Kevin Wolf --- block/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/io.c b/block/io.c index 2e267a85ab..6fa1993374 100644 --- a/block/io.c +++ b/block/io.c @@ -524,7 +524,7 @@ void bdrv_drain_all_begin(void) bdrv_drain_all_begin_nopoll(); /* Now poll the in-flight requests */ - AIO_WAIT_WHILE(NULL, bdrv_drain_all_poll()); + AIO_WAIT_WHILE_UNLOCKED(NULL, bdrv_drain_all_poll()); while ((bs = bdrv_next_all_states(bs))) { bdrv_drain_assert_idle(bs);