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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/block-backend.c b/block/block-backend.c
index 3e58b95b8a..b4d2387947 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -1719,6 +1719,7 @@ blk_co_do_pdiscard(BlockBackend *blk, int64_t offset, int64_t bytes)
IO_CODE();
blk_wait_while_drained(blk);
+ GRAPH_RDLOCK_GUARD();
ret = blk_check_byte_request(blk, offset, bytes);
if (ret < 0) {