Skip to content

Commit

Permalink
[PATCH] cciss: fix for deregister_disk
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mike Miller authored and Linus Torvalds committed Dec 13, 2005
1 parent 8309cf6 commit 2f6331f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit 2f6331f

Please sign in to comment.