* [PATCH] virtio-blk: fix remove oops
@ 2008-04-24 18:49 Marcelo Tosatti
2008-04-24 19:18 ` Rusty Russell
0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Tosatti @ 2008-04-24 18:49 UTC (permalink / raw)
To: Rusty Russell, Anthony Liguori; +Cc: virtualization
Do not unregister the major at device remove, since there might be
another device instances around.
(qemu) pci_del 0 11
(qemu) ACPI: PCI interrupt for device 0000:00:0b.0 disabled
(qemu) pci_del 0 10
(qemu) ------------[ cut here ]------------
WARNING: at block/genhd.c:126 unregister_blkdev+0x74/0x9e()
ACPI: PCI interrupt for device 0000:00:0a.0 disabled
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 0cfbe8c..6231097 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -289,7 +289,6 @@ out:
static void virtblk_remove(struct virtio_device *vdev)
{
struct virtio_blk *vblk = vdev->priv;
- int major = vblk->disk->major;
/* Nothing should be pending. */
BUG_ON(!list_empty(&vblk->reqs));
@@ -299,7 +298,6 @@ static void virtblk_remove(struct virtio_device *vdev)
blk_cleanup_queue(vblk->disk->queue);
put_disk(vblk->disk);
- unregister_blkdev(major, "virtblk");
mempool_destroy(vblk->pool);
vdev->config->del_vq(vblk->vq);
kfree(vblk);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] virtio-blk: fix remove oops
2008-04-24 18:49 [PATCH] virtio-blk: fix remove oops Marcelo Tosatti
@ 2008-04-24 19:18 ` Rusty Russell
0 siblings, 0 replies; 2+ messages in thread
From: Rusty Russell @ 2008-04-24 19:18 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: Anthony Liguori, virtualization
On Friday 25 April 2008 04:49:53 Marcelo Tosatti wrote:
> Do not unregister the major at device remove, since there might be
> another device instances around.
>
> (qemu) pci_del 0 11
> (qemu) ACPI: PCI interrupt for device 0000:00:0b.0 disabled
> (qemu) pci_del 0 10
> (qemu) ------------[ cut here ]------------
> WARNING: at block/genhd.c:126 unregister_blkdev+0x74/0x9e()
> ACPI: PCI interrupt for device 0000:00:0a.0 disabled
Thanks, applied!
Rusty.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-24 19:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-24 18:49 [PATCH] virtio-blk: fix remove oops Marcelo Tosatti
2008-04-24 19:18 ` Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).