Skip to content

Commit

Permalink
block: Don't call no_coroutine_fns in qmp_block_resize()
Browse files Browse the repository at this point in the history
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: [email protected]
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
  • Loading branch information
kevmw committed May 10, 2023
1 parent b2ab5f5 commit 0c7d204
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blockdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2440,7 +2440,7 @@ void coroutine_fn qmp_block_resize(const char *device, const char *node_name,
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 @@ -2455,7 +2455,7 @@ void coroutine_fn qmp_block_resize(const char *device, const char *node_name,

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 0c7d204

Please sign in to comment.