mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
Fix crash in virtio_blk during modprobe ; rmmod ; modprobe
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)
This commit is contained in:
parent
e27810f113
commit
ac9d463afb
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue