aboutsummaryrefslogtreecommitdiff
path: root/block/block-backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/block-backend.c')
-rw-r--r--block/block-backend.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/block-backend.c b/block/block-backend.c
index fdb1e1d5f7..3661a066b3 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -2328,6 +2328,7 @@ void coroutine_fn blk_co_io_plug(BlockBackend *blk)
{
BlockDriverState *bs = blk_bs(blk);
IO_CODE();
+ GRAPH_RDLOCK_GUARD();
if (bs) {
bdrv_co_io_plug(bs);
@@ -2338,6 +2339,7 @@ void coroutine_fn blk_co_io_unplug(BlockBackend *blk)
{
BlockDriverState *bs = blk_bs(blk);
IO_CODE();
+ GRAPH_RDLOCK_GUARD();
if (bs) {
bdrv_co_io_unplug(bs);