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:
Paolo Bonzini 2012-05-16 12:54:04 +02:00 committed by Anthony Liguori
parent f34e73cd69
commit 0e47931b88
2 changed files with 1 additions and 1 deletions

View File

@ -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);
} }

View File

@ -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);
} }