aboutsummaryrefslogtreecommitdiff
path: root/block/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/io.c')
-rw-r--r--block/io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/io.c b/block/io.c
index d2be37b11e..35025fc11b 100644
--- a/block/io.c
+++ b/block/io.c
@@ -3380,6 +3380,7 @@ int coroutine_fn bdrv_co_truncate(BdrvChild *child, int64_t offset, bool exact,
int64_t old_size, new_bytes;
int ret;
IO_CODE();
+ assert_bdrv_graph_readable();
/* if bs->drv == NULL, bs is closed, so there's nothing to do here */
if (!drv) {