[SCSI] ipr: fix addition of abort command to HRRQ free queue
authorKleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Thu, 14 Mar 2013 18:52:23 +0000 (13:52 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Sat, 6 Apr 2013 10:23:18 +0000 (11:23 +0100)
The abort command issued by ipr_cancel_op() is being added to the wrong
HRRQ free queue after the command returns. Fix it by using the HRRQ
pointer in the ipr command struct itself.

Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/ipr.c

index fadf1528db3d3bfa11e99e04856b9de6ab8b4cf0..21e0a0ae43a826f9a7b64cb3d1f398c90dc3102e 100644 (file)
@@ -5148,7 +5148,7 @@ static int ipr_cancel_op(struct scsi_cmnd *scsi_cmd)
                ipr_trace;
        }
 
-       list_add_tail(&ipr_cmd->queue, &hrrq->hrrq_free_q);
+       list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
        if (!ipr_is_naca_model(res))
                res->needs_sync_complete = 1;