aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/scsi_sysfs.c3
-rw-r--r--include/scsi/scsi_device.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 134d3a3e4222..e75ee4671ee3 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -171,6 +171,9 @@ void scsi_device_dev_release(struct device *dev)
171 if (sdev->request_queue) { 171 if (sdev->request_queue) {
172 sdev->request_queue->queuedata = NULL; 172 sdev->request_queue->queuedata = NULL;
173 scsi_free_queue(sdev->request_queue); 173 scsi_free_queue(sdev->request_queue);
174 /* temporary expedient, try to catch use of queue lock
175 * after free of sdev */
176 sdev->request_queue = NULL;
174 } 177 }
175 178
176 scsi_target_reap(scsi_target(sdev)); 179 scsi_target_reap(scsi_target(sdev));
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index f6d051318299..fe9571d2e306 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -43,6 +43,7 @@ struct scsi_device {
43 struct list_head siblings; /* list of all devices on this host */ 43 struct list_head siblings; /* list of all devices on this host */
44 struct list_head same_target_siblings; /* just the devices sharing same target id */ 44 struct list_head same_target_siblings; /* just the devices sharing same target id */
45 45
46 /* this is now protected by the request_queue->queue_lock */
46 volatile unsigned short device_busy; /* commands actually active on low-level */ 47 volatile unsigned short device_busy; /* commands actually active on low-level */
47 spinlock_t list_lock; 48 spinlock_t list_lock;
48 struct list_head cmd_list; /* queue of in use SCSI Command structures */ 49 struct list_head cmd_list; /* queue of in use SCSI Command structures */