Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
block: Don't call no_coroutine_fns in qmp_block_resize()
This QMP handler runs in a coroutine, so it must use the corresponding
no_co_wrappers instead.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2185688
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-5-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 0c7d204)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
Kevin Wolf authored and Michael Tokarev committed May 11, 2023
1 parent a1a63c4 commit 9f57868
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blockdev.c
Expand Up @@ -2448,7 +2448,7 @@ void coroutine_fn qmp_block_resize(bool has_device, const char *device,
return;
}

blk = blk_new_with_bs(bs, BLK_PERM_RESIZE, BLK_PERM_ALL, errp);
blk = blk_co_new_with_bs(bs, BLK_PERM_RESIZE, BLK_PERM_ALL, errp);
if (!blk) {
return;
}
Expand All @@ -2463,7 +2463,7 @@ void coroutine_fn qmp_block_resize(bool has_device, const char *device,

bdrv_co_lock(bs);
bdrv_drained_end(bs);
blk_unref(blk);
blk_co_unref(blk);
bdrv_co_unlock(bs);
}

Expand Down

0 comments on commit 9f57868

Please sign in to comment.