From patchwork Fri Oct 18 07:50:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 11197665 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E377B5C95 for ; Fri, 18 Oct 2019 07:50:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C473C21D80 for ; Fri, 18 Oct 2019 07:50:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504695AbfJRHuO (ORCPT ); Fri, 18 Oct 2019 03:50:14 -0400 Received: from mx2.suse.de ([195.135.220.15]:36798 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2504690AbfJRHuO (ORCPT ); Fri, 18 Oct 2019 03:50:14 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 532E3B822; Fri, 18 Oct 2019 07:50:12 +0000 (UTC) From: Hannes Reinecke To: James Smart Cc: Dick Kennedy , "Martin K. Petersen" , Christoph Hellwig , James Bottomley , linux-scsi@vger.kernel.org, Hannes Reinecke , Hannes Reinecke Subject: [PATCH 2/3] lpfc: access nodelist through scsi-specific rdata pointer Date: Fri, 18 Oct 2019 09:50:09 +0200 Message-Id: <20191018075010.55653-3-hare@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191018075010.55653-1-hare@suse.de> References: <20191018075010.55653-1-hare@suse.de> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Access the nodelist through the scsi-specific rdata pointer when handling SCSI requests. Signed-off-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc_scsi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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);