From: Mike Miller Date: Tue, 13 Dec 2005 06:17:14 +0000 (-0800) Subject: [PATCH] cciss: fix for deregister_disk X-Git-Tag: v2.6.15-rc6~85 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f6331faf58a4727a9f1138cd6db30d05b124220;p=linux-2.6 [PATCH] cciss: fix for deregister_disk This patch adds setting our drv->queue = NULL back in deregister_disk. The drv->queue is part of our controller struct. blk_cleanup_queue works only on the queue in the gendisk struct. Signed-off-by: Mike Miller Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index e34104d326..c3441b3f08 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -1464,8 +1464,10 @@ static int deregister_disk(struct gendisk *disk, drive_info_struct *drv, request_queue_t *q = disk->queue; if (disk->flags & GENHD_FL_UP) del_gendisk(disk); - if (q) + if (q) { blk_cleanup_queue(q); + drv->queue = NULL; + } } }