]> git.proxmox.com Git - mirror_qemu.git/blobdiff - block/backup.c
Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging
[mirror_qemu.git] / block / backup.c
index 5b8863b88cb5d6c33c8f7e2643586592d1e88072..db3791f4d16d5f45e880959f6e065b9c13539ced 100644 (file)
@@ -269,7 +269,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;
             }