diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/block-backend.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/block/block-backend.c b/block/block-backend.c index d87ae435a7..ff417dbff9 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -2153,8 +2153,12 @@ static int blk_do_set_aio_context(BlockBackend *blk, AioContext *new_context, bdrv_ref(bs); if (update_root_node) { - ret = bdrv_child_try_set_aio_context(bs, new_context, blk->root, - errp); + /* + * update_root_node MUST be false for blk_root_set_aio_ctx_commit(), + * as we are already in the commit function of a transaction. + */ + ret = bdrv_child_try_change_aio_context(bs, new_context, blk->root, + errp); if (ret < 0) { bdrv_unref(bs); return ret; |