]> git.proxmox.com Git - mirror_qemu.git/blobdiff - block/block-copy.c
block: Mark bdrv_chain_contains() and callers GRAPH_RDLOCK
[mirror_qemu.git] / block / block-copy.c
index 6b2be3d20432c67d913143b5bf38acde1ccc83c5..9ee3dd7ef57b3695a5fc9c66bd76fcda9fc93fc0 100644 (file)
@@ -399,7 +399,9 @@ BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target,
      * For more information see commit f8d59dfb40bb and test
      * tests/qemu-iotests/222
      */
+    bdrv_graph_rdlock_main_loop();
     is_fleecing = bdrv_chain_contains(target->bs, source->bs);
+    bdrv_graph_rdunlock_main_loop();
 
     s = g_new(BlockCopyState, 1);
     *s = (BlockCopyState) {