]> err.no Git - linux-2.6/commitdiff
Fix crash in virtio_blk during modprobe ; rmmod ; modprobe
authorChris Lalancette <clalance@redhat.com>
Fri, 30 May 2008 20:09:41 +0000 (15:09 -0500)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 30 May 2008 05:09:41 +0000 (15:09 +1000)
Fix a modprobe virtio_blk ; rmmod virtio_blk ; modprobe virtio_blk crash; this
was basically because we weren't doing "del_gendisk()" in the remove path.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (moved del_gendisk up)
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);