From: James Smart Date: Fri, 1 Jul 2022 21:14:17 +0000 (-0700) Subject: scsi: lpfc: Remove extra atomic_inc on cmd_pending in queuecommand after VMID X-Git-Tag: baikal/mips/sdk5.9~77 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=cb1f9515e7e88836a509c318add7783688eab14b;p=kernel.git scsi: lpfc: Remove extra atomic_inc on cmd_pending in queuecommand after VMID [ Upstream commit ed5fda986d2071369b88dfeff9ac34047a437a7e ] VMID introduced an extra increment of cmd_pending, causing double-counting of the I/O. The normal increment ios performed in lpfc_get_scsi_buf. Link: https://lore.kernel.org/r/20220701211425.2708-5-jsmart2021@gmail.com Fixes: 4a7c4d478621 ("scsi: lpfc: vmid: Introduce VMID in I/O path") Cc: # v5.14+ Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index b43dfcb81185d..7da8e4c845df8 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -5707,7 +5707,6 @@ lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) cur_iocbq->cmd_flag |= LPFC_IO_VMID; } } - atomic_inc(&ndlp->cmd_pending); #ifdef CONFIG_SCSI_LPFC_DEBUG_FS if (unlikely(phba->hdwqstat_on & LPFC_CHECK_SCSI_IO))