[PATCH 1/1] cciss: fix for deregister_disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patch 1/1
Been doing some cleanup in various parts of the driver (more like adding
bugs). Got to keep busy!
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. Please apply this patch.

Signed-off-by: Mike Miller <mike.miller@xxxxxxx
--------------------------------------------------------------------------------
 cciss.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index e34104d..1d56f2a 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1464,8 +1464,10 @@ static int deregister_disk(struct gendis
 			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;
+			}
 		}
 	}
 
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux