diff options
-rw-r--r-- | hw/virtio-blk.c | 1 | ||||
-rw-r--r-- | hw/virtio-pci.c | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index d11bb807be..afd15f2997 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -621,5 +621,6 @@ void virtio_blk_exit(VirtIODevice *vdev) { VirtIOBlock *s = to_virtio_blk(vdev); unregister_savevm(s->qdev, "virtio-blk", s); + blockdev_mark_auto_del(s->bs); virtio_cleanup(vdev); } diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 8a931ced24..f2f4153ade 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -726,7 +726,6 @@ static int virtio_blk_exit_pci(PCIDevice *pci_dev) virtio_pci_stop_ioeventfd(proxy); virtio_blk_exit(proxy->vdev); - blockdev_mark_auto_del(proxy->block.bs); return virtio_exit_pci(pci_dev); } |