From: James Bottomley Date: Wed, 26 Mar 2008 16:09:19 +0000 (-0700) Subject: Revert "[SCSI] fix bsg queue oops with iscsi logout" X-Git-Tag: v2.6.25-rc9~97^2~10 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=0feed274d2dfa2162d2c37c254eede96926d3717;p=linux-2.6-omap-h63xx.git Revert "[SCSI] fix bsg queue oops with iscsi logout" This reverts commit 4b6f5b3a993cbe34b4280f252bccc76967c185c8. bsg takes a reference to the underlying generic device, so it's impossible to unregister bsg in the device release routine. Acked-by: FUJITA Tomonori Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index b9b09a70458..ed83cdb6e67 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -294,7 +294,6 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work) } if (sdev->request_queue) { - bsg_unregister_queue(sdev->request_queue); sdev->request_queue->queuedata = NULL; /* user context needed to free queue */ scsi_free_queue(sdev->request_queue); @@ -858,6 +857,7 @@ void __scsi_remove_device(struct scsi_device *sdev) if (scsi_device_set_state(sdev, SDEV_CANCEL) != 0) return; + bsg_unregister_queue(sdev->request_queue); class_device_unregister(&sdev->sdev_classdev); transport_remove_device(dev); device_del(dev);