aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_sysfs.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2008-03-11 01:36:51 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-03-13 17:47:05 -0400
commit4b6f5b3a993cbe34b4280f252bccc76967c185c8 (patch)
tree2f7a0d8df682860c5863c0822b69fc3171c0cf82 /drivers/scsi/scsi_sysfs.c
parent67951f63807328b81e45c3c87af049c55c0a0081 (diff)
[SCSI] fix bsg queue oops with iscsi logout
Delay bsg unregistration, because we want to wait until all the request/cmds have released their reference. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-rw-r--r--drivers/scsi/scsi_sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index ed83cdb6e67d..b9b09a704584 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -294,6 +294,7 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work)
294 } 294 }
295 295
296 if (sdev->request_queue) { 296 if (sdev->request_queue) {
297 bsg_unregister_queue(sdev->request_queue);
297 sdev->request_queue->queuedata = NULL; 298 sdev->request_queue->queuedata = NULL;
298 /* user context needed to free queue */ 299 /* user context needed to free queue */
299 scsi_free_queue(sdev->request_queue); 300 scsi_free_queue(sdev->request_queue);
@@ -857,7 +858,6 @@ void __scsi_remove_device(struct scsi_device *sdev)
857 if (scsi_device_set_state(sdev, SDEV_CANCEL) != 0) 858 if (scsi_device_set_state(sdev, SDEV_CANCEL) != 0)
858 return; 859 return;
859 860
860 bsg_unregister_queue(sdev->request_queue);
861 class_device_unregister(&sdev->sdev_classdev); 861 class_device_unregister(&sdev->sdev_classdev);
862 transport_remove_device(dev); 862 transport_remove_device(dev);
863 device_del(dev); 863 device_del(dev);