diff options
Diffstat (limited to 'block/backup.c')
-rw-r--r-- | block/backup.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block/backup.c b/block/backup.c index 824d39a..46fca24 100644 --- a/block/backup.c +++ b/block/backup.c @@ -270,7 +270,10 @@ static int coroutine_fn backup_run(Job *job, Error **errp) return -ECANCELED; } + /* rdlock protects the subsequent call to bdrv_is_allocated() */ + bdrv_graph_co_rdlock(); ret = block_copy_reset_unallocated(s->bcs, offset, &count); + bdrv_graph_co_rdunlock(); if (ret < 0) { return ret; } |