]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
block/io: remove duplicate GLOBAL_STATE_CODE() in bdrv_do_drained_end()
authorFiona Ebner <f.ebner@proxmox.com>
Fri, 30 May 2025 15:10:59 +0000 (17:10 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 4 Jun 2025 16:16:34 +0000 (18:16 +0200)
Both commit ab61335025 ("block: drain from main loop thread in
bdrv_co_yield_to_drain()") and commit d05ab380db ("block: Mark drain
related functions GRAPH_RDLOCK") introduced a GLOBAL_STATE_CODE()
macro in bdrv_do_drained_end(). The assertion of being in the main
thread cannot change here, so keep only the earlier instance.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Message-ID: <20250530151125.955508-23-f.ebner@proxmox.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/io.c

index 4fd7768f9cd07364897ba31b2f9b038071401dbb..ac5c7174f6bb7f7b73e19984da4f23e132a70abc 100644 (file)
@@ -413,7 +413,6 @@ static void bdrv_do_drained_end(BlockDriverState *bs, BdrvChild *parent)
     /* At this point, we should be always running in the main loop. */
     GLOBAL_STATE_CODE();
     assert(bs->quiesce_counter > 0);
-    GLOBAL_STATE_CODE();
 
     /* Re-enable things in child-to-parent order */
     old_quiesce_counter = qatomic_fetch_dec(&bs->quiesce_counter);