diff mbox series

[2/3] lpfc: access nodelist through scsi-specific rdata pointer

Message ID 20191018075010.55653-3-hare@suse.de (mailing list archive)
State Changes Requested
Headers show
Series lpfc: nodelist pointer cleanup | expand

Commit Message

Hannes Reinecke Oct. 18, 2019, 7:50 a.m. UTC
Access the nodelist through the scsi-specific rdata pointer when
handling SCSI requests.

Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 drivers/scsi/lpfc/lpfc_scsi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index bb66dfb8dd71..5f80ec31afb7 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -808,8 +808,8 @@  lpfc_release_scsi_buf_s4(struct lpfc_hba *phba, struct lpfc_io_buf *psb)
 static void
 lpfc_release_scsi_buf(struct lpfc_hba *phba, struct lpfc_io_buf *psb)
 {
-	if ((psb->flags & LPFC_SBUF_BUMP_QDEPTH) && psb->ndlp)
-		atomic_dec(&psb->ndlp->cmd_pending);
+	if ((psb->flags & LPFC_SBUF_BUMP_QDEPTH) && psb->scsi.rdata->pnode)
+		atomic_dec(&psb->scsi.rdata->pnode->cmd_pending);
 
 	psb->flags &= ~LPFC_SBUF_BUMP_QDEPTH;
 	phba->lpfc_release_scsi_buf(phba, psb);
@@ -4580,7 +4580,6 @@  lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
 	 */
 	lpfc_cmd->scsi.pCmd  = cmnd;
 	lpfc_cmd->scsi.rdata = rdata;
-	lpfc_cmd->ndlp = ndlp;
 	cmnd->host_scribble = (unsigned char *)lpfc_cmd;
 
 	if (scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) {
@@ -5035,7 +5034,6 @@  lpfc_send_taskmgmt(struct lpfc_vport *vport, struct scsi_cmnd *cmnd,
 	lpfc_cmd->timeout = phba->cfg_task_mgmt_tmo;
 	lpfc_cmd->scsi.rdata = rdata;
 	lpfc_cmd->scsi.pCmd = cmnd;
-	lpfc_cmd->ndlp = pnode;
 
 	status = lpfc_scsi_prep_task_mgmt_cmd(vport, lpfc_cmd, lun_id,
 					   task_mgmt_cmd);