[PATCH] cciss: fix for deregister_disk
authorMike Miller <mike.miller@hp.com>
Tue, 13 Dec 2005 06:17:14 +0000 (22:17 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 13 Dec 2005 06:31:16 +0000 (22:31 -0800)
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 <mike.miller@hp.com>
Cc: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/block/cciss.c

index e34104d32637acf4e055d61d2ec52aba78fdac1d..c3441b3f086eabaa5165ad5bec0e9ecb3ab3b258 100644 (file)
@@ -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;
+                       }
                }
        }