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>
This commit is contained in:
Родитель
5409bc3a20
Коммит
18d3d72a42
|
@ -631,13 +631,16 @@ static void isci_request_cleanup_completed_loiterer(
|
||||||
struct isci_remote_device *isci_device,
|
struct isci_remote_device *isci_device,
|
||||||
struct isci_request *isci_request)
|
struct isci_request *isci_request)
|
||||||
{
|
{
|
||||||
struct sas_task *task = isci_request_access_task(isci_request);
|
struct sas_task *task;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
|
task = (isci_request->ttype == io_task)
|
||||||
|
? isci_request_access_task(isci_request)
|
||||||
|
: NULL;
|
||||||
|
|
||||||
dev_dbg(&isci_host->pdev->dev,
|
dev_dbg(&isci_host->pdev->dev,
|
||||||
"%s: isci_device=%p, request=%p, task=%p\n",
|
"%s: isci_device=%p, request=%p, task=%p\n",
|
||||||
__func__, isci_device, isci_request,
|
__func__, isci_device, isci_request, task);
|
||||||
isci_request->ttype_ptr.io_task_ptr);
|
|
||||||
|
|
||||||
spin_lock_irqsave(&isci_host->scic_lock, flags);
|
spin_lock_irqsave(&isci_host->scic_lock, flags);
|
||||||
list_del_init(&isci_request->dev_node);
|
list_del_init(&isci_request->dev_node);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче