From b2ab5f545fa1eaaf2955dd617bee19a8b3279786 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 4 May 2023 13:57:33 +0200 Subject: block: bdrv/blk_co_unref() for calls in coroutine context These functions must not be called in coroutine context, because they need write access to the graph. Cc: qemu-stable@nongnu.org Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Message-Id: <20230504115750.54437-4-kwolf@redhat.com> Signed-off-by: Kevin Wolf --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block.c') diff --git a/block.c b/block.c index 5ec1a3897e..20d5ee0959 100644 --- a/block.c +++ b/block.c @@ -680,7 +680,7 @@ int coroutine_fn bdrv_co_create_opts_simple(BlockDriver *drv, ret = 0; out: - blk_unref(blk); + blk_co_unref(blk); return ret; } -- cgit v1.2.3