diff options
author | Jeff Skirvin <jeffrey.d.skirvin@intel.com> | 2011-03-04 17:06:38 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 06:55:29 -0400 |
commit | 18d3d72a42a846d46b71131982c51d63eba2b7b3 (patch) | |
tree | a1ce9f03bc358c26750bcd4068a8168e3f13e2c4 | |
parent | 5409bc3a20b239d1b3919db451ee4f6513e64ed1 (diff) |
isci: isci_request_cleanup_completed_loiterer checks task before task_done
In the condition where outstanding I/Os are being cleaned from the device
requests in process list, the cleanup function needs to check that the
request is actually a sas-task and not a task management function.
Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r-- | drivers/scsi/isci/task.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c index 98204b031649..779f6cfba6be 100644 --- a/drivers/scsi/isci/task.c +++ b/drivers/scsi/isci/task.c | |||
@@ -631,13 +631,16 @@ static void isci_request_cleanup_completed_loiterer( | |||
631 | struct isci_remote_device *isci_device, | 631 | struct isci_remote_device *isci_device, |
632 | struct isci_request *isci_request) | 632 | struct isci_request *isci_request) |
633 | { | 633 | { |
634 | struct sas_task *task = isci_request_access_task(isci_request); | 634 | struct sas_task *task; |
635 | unsigned long flags; | 635 | unsigned long flags; |
636 | |||
637 | task = (isci_request->ttype == io_task) | ||
638 | ? isci_request_access_task(isci_request) | ||
639 | : NULL; | ||
636 | 640 | ||
637 | dev_dbg(&isci_host->pdev->dev, | 641 | dev_dbg(&isci_host->pdev->dev, |
638 | "%s: isci_device=%p, request=%p, task=%p\n", | 642 | "%s: isci_device=%p, request=%p, task=%p\n", |
639 | __func__, isci_device, isci_request, | 643 | __func__, isci_device, isci_request, task); |
640 | isci_request->ttype_ptr.io_task_ptr); | ||
641 | 644 | ||
642 | spin_lock_irqsave(&isci_host->scic_lock, flags); | 645 | spin_lock_irqsave(&isci_host->scic_lock, flags); |
643 | list_del_init(&isci_request->dev_node); | 646 | list_del_init(&isci_request->dev_node); |