Also here ->aio_context is read by I/O threads and written
under BQL.
Signed-off-by: Emanuele Giuseppe Esposito <[email protected]>
Reviewed-by: Kevin Wolf <[email protected]>
Reviewed-by: Hanna Reitz <[email protected]>
---
block.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block.c b/block.c
index 554ce727c3..529be80759 100644
--- a/block.c
+++ b/block.c
@@ -7153,6 +7153,7 @@ static void bdrv_detach_aio_context(BlockDriverState *bs)
if (bs->quiesce_counter) {
aio_enable_external(bs->aio_context);
}
+ assert_bdrv_graph_writable(bs);
bs->aio_context = NULL;
}
@@ -7166,6 +7167,7 @@ static void bdrv_attach_aio_context(BlockDriverState *bs,
aio_disable_external(new_context);
}
+ assert_bdrv_graph_writable(bs);
bs->aio_context = new_context;
if (bs->drv && bs->drv->bdrv_attach_aio_context) {
--
2.31.1