]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/block/virtio_blk.c
Fix crash in virtio_blk during modprobe ; rmmod ; modprobe
[linux-2.6-omap-h63xx.git] / drivers / block / virtio_blk.c
index 84e064ffee5229e73d2f9f45af19a3ec581f5315..c4804f3465db6706161e60271b472e9a5bcb2a83 100644 (file)
@@ -311,6 +311,7 @@ static void virtblk_remove(struct virtio_device *vdev)
        /* Stop all the virtqueues. */
        vdev->config->reset(vdev);
 
+       del_gendisk(vblk->disk);
        blk_cleanup_queue(vblk->disk->queue);
        put_disk(vblk->disk);
        mempool_destroy(vblk->pool);