From: Kevin Wolf Date: Wed, 10 May 2023 20:35:59 +0000 (+0200) Subject: test-bdrv-drain: Call bdrv_co_unref() in coroutine context X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=01a10c243362e49afcb7acbd85a47eba64a6fc74;p=qmiga%2Fqemu.git test-bdrv-drain: Call bdrv_co_unref() in coroutine context bdrv_unref() is a no_coroutine_fn, so calling it from coroutine context is invalid. Use bdrv_co_unref() instead. Signed-off-by: Kevin Wolf Message-Id: <20230510203601.418015-7-kwolf@redhat.com> Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- diff --git a/tests/unit/test-bdrv-drain.c b/tests/unit/test-bdrv-drain.c index ae4299ccfa..08bb0f9984 100644 --- a/tests/unit/test-bdrv-drain.c +++ b/tests/unit/test-bdrv-drain.c @@ -1019,7 +1019,7 @@ static void coroutine_fn test_co_delete_by_drain(void *opaque) g_assert_cmpint(bs->refcnt, ==, 1); if (!dbdd->detach_instead_of_delete) { - blk_unref(blk); + blk_co_unref(blk); } else { BdrvChild *c, *next_c; QLIST_FOREACH_SAFE(c, &bs->children, next, next_c) {