virtio-blk: blockdev_mark_auto_del is transport-independent
Move it from virtio_blk_exit_pci to virtio_blk_exit. This is included here because the next patch removes proxy->block. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
f34e73cd69
commit
0e47931b88
@ -621,5 +621,6 @@ void virtio_blk_exit(VirtIODevice *vdev)
|
|||||||
{
|
{
|
||||||
VirtIOBlock *s = to_virtio_blk(vdev);
|
VirtIOBlock *s = to_virtio_blk(vdev);
|
||||||
unregister_savevm(s->qdev, "virtio-blk", s);
|
unregister_savevm(s->qdev, "virtio-blk", s);
|
||||||
|
blockdev_mark_auto_del(s->bs);
|
||||||
virtio_cleanup(vdev);
|
virtio_cleanup(vdev);
|
||||||
}
|
}
|
||||||
|
@ -726,7 +726,6 @@ static int virtio_blk_exit_pci(PCIDevice *pci_dev)
|
|||||||
|
|
||||||
virtio_pci_stop_ioeventfd(proxy);
|
virtio_pci_stop_ioeventfd(proxy);
|
||||||
virtio_blk_exit(proxy->vdev);
|
virtio_blk_exit(proxy->vdev);
|
||||||
blockdev_mark_auto_del(proxy->block.bs);
|
|
||||||
return virtio_exit_pci(pci_dev);
|
return virtio_exit_pci(pci_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user