mirror of https://github.com/xemu-project/xemu.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 <kwolf@redhat.com> Message-Id: <20230510203601.418015-7-kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
87f130bdaa
commit
01a10c2433
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue