diff options
author | Kevin Wolf <kwolf@redhat.com> | 2023-05-04 13:57:33 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2023-05-10 14:16:53 +0200 |
commit | b2ab5f545fa1eaaf2955dd617bee19a8b3279786 (patch) | |
tree | 8aca0214ad2c853a0488681dc07270f3b8512978 /block/vhdx.c | |
parent | da4afaff074e56b0fa0d25abf865784148018895 (diff) | |
download | qemu-b2ab5f545fa1eaaf2955dd617bee19a8b3279786.zip qemu-b2ab5f545fa1eaaf2955dd617bee19a8b3279786.tar.gz qemu-b2ab5f545fa1eaaf2955dd617bee19a8b3279786.tar.bz2 |
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 <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-4-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/vhdx.c')
-rw-r--r-- | block/vhdx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/vhdx.c b/block/vhdx.c index 8142072..00777da 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -2053,8 +2053,8 @@ static int coroutine_fn vhdx_co_create(BlockdevCreateOptions *opts, ret = 0; delete_and_exit: - blk_unref(blk); - bdrv_unref(bs); + blk_co_unref(blk); + bdrv_co_unref(bs); g_free(creator); return ret; } @@ -2144,7 +2144,7 @@ vhdx_co_create_opts(BlockDriver *drv, const char *filename, fail: qobject_unref(qdict); - bdrv_unref(bs); + bdrv_co_unref(bs); qapi_free_BlockdevCreateOptions(create_options); return ret; } |