You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
scsi: qla2xxx: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
[ Upstream commit c7d6b2c2cd ]
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-39-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stable-dep-of: 19597cad64d6 ("scsi: qla2xxx: Fix system crash due to bad pointer access")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b19fe82b4b
commit
46a4bf1350
@@ -839,7 +839,7 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
|
||||
uint16_t hwq;
|
||||
struct qla_qpair *qpair = NULL;
|
||||
|
||||
tag = blk_mq_unique_tag(cmd->request);
|
||||
tag = blk_mq_unique_tag(scsi_cmd_to_rq(cmd));
|
||||
hwq = blk_mq_unique_tag_to_hwq(tag);
|
||||
qpair = ha->queue_pair_map[hwq];
|
||||
|
||||
@@ -1714,7 +1714,7 @@ static void qla2x00_abort_srb(struct qla_qpair *qp, srb_t *sp, const int res,
|
||||
}
|
||||
|
||||
spin_lock_irqsave(qp->qp_lock_ptr, *flags);
|
||||
if (ret_cmd && blk_mq_request_started(cmd->request))
|
||||
if (ret_cmd && blk_mq_request_started(scsi_cmd_to_rq(cmd)))
|
||||
sp->done(sp, res);
|
||||
} else {
|
||||
sp->done(sp, res);
|
||||
|
||||
Reference in New Issue
Block a user