]> git.proxmox.com Git - mirror_qemu.git/blobdiff - block.c
block: Keep subtree drained in drop_intermediate
[mirror_qemu.git] / block.c
diff --git a/block.c b/block.c
index 6db8ecd62b189545a669e7f33c29565f486501ce..df3407934bf1ae01ec0ff7983dc079ff0ffcaf14 100644 (file)
--- a/block.c
+++ b/block.c
@@ -4491,6 +4491,7 @@ int bdrv_drop_intermediate(BlockDriverState *top, BlockDriverState *base,
     int ret = -EIO;
 
     bdrv_ref(top);
+    bdrv_subtree_drained_begin(top);
 
     if (!top->drv || !base->drv) {
         goto exit;
@@ -4562,6 +4563,7 @@ int bdrv_drop_intermediate(BlockDriverState *top, BlockDriverState *base,
 
     ret = 0;
 exit:
+    bdrv_subtree_drained_end(top);
     bdrv_unref(top);
     return ret;
 }