Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2886479rwb; Mon, 15 Aug 2022 13:19:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR5OUYmotbZqAU6WI8ZddXr4QAoupqINjaZE7vD8Ri1Ne6T+4ohKUVt3kbJVgwIQzTlyH9NI X-Received: by 2002:a17:907:3e86:b0:6f5:917:10cc with SMTP id hs6-20020a1709073e8600b006f5091710ccmr11562933ejc.53.1660594751935; Mon, 15 Aug 2022 13:19:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594751; cv=none; d=google.com; s=arc-20160816; b=sTgMnCHx7g0HGGEMun33i8vy1xp5TUDzeYboL45x7KdO6qXhacLTZ30QUTDT3l+F6E uykxLiqS7bpkUlLCjxQH+gEyCPgZeOy2rQ322k5uG5Qy3WrHgl76+n8eAawE5UTw8IhK rHb8hCRUH1yYPcFmZh9BEyqx2bP3YI+G6lPG8IkyTrMdbWQnNnqq1t2XybSK6fNKMtCj gbtBlUt4VMZFlUUDiRQExwY8KTph+RsDfvpT1wl82ECN2pDkgJN2fXXux35HJcV688cv daZftOeha474row2G401PFXIu3FBp4foDBNTBTzY3IV2b4OHdDMN/sLtPfaCEy8bhXMP /7Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BteNEvnf7/shWjfSblmSra8tWuCOKk/1v1HLvBy+w8k=; b=Z54TDQb5dkfuYgmnz0RuWc6xEmRG7MD/5I61smdz6bpsLlvvwPOi4v/ZI16z9ZWNPv ICwiRuT+aNyAoOBc3obCOrmyNT/VdpnhYZ+e7LiE6JCIvLtm79P6GtSCY+L7xEGPOUk1 qP/jFQgbQnMVWuU76gw7IHXln22hyNUMtmTokLD3Ds7Ce3rgMSVKCxua5G9QvYlz0PzU N7A7gRfW/GoqUcZMqO6fQbjZ8EHhYN/ltNxXbY3q1AfGNQgPyAJy+tSlXSmu/1sv0kN5 IwQ/AGo8c5tHkw/g8RB8cNj0o0oIwL+uQmzplW6sz5GNHful+w5UVqbokphbFLKiUTBG V+XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=q3F9mYka; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du9-20020a17090772c900b00730a21eaa9dsi7776746ejc.760.2022.08.15.13.18.44; Mon, 15 Aug 2022 13:19:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=q3F9mYka; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242822AbiHOTvu (ORCPT + 99 others); Mon, 15 Aug 2022 15:51:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345328AbiHOTte (ORCPT ); Mon, 15 Aug 2022 15:49:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91AFA72EE3; Mon, 15 Aug 2022 11:49:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C98ECB810A2; Mon, 15 Aug 2022 18:49:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1EC13C433D7; Mon, 15 Aug 2022 18:49:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660589390; bh=ev8eCZf7nG2UYA4LnbFQTNpzxmmKDb0z0eXAbIoA9Po=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q3F9mYkahY6QsODM9Z1HXds+xaWtMVfbiTJX1uIVKSD4dshiefHHdYViS7F8RSVFI 0siRjOda+dWG9rRSIpGSNCffEcYeNDvHbDmO83sMF6maDrUeYMaoMVlk/BLu5lUqPG VbF78yd/+gtphOyWijxB4HR/gx+ecHb7+Wi0dVRY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Justin Tee , James Smart , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.15 704/779] scsi: lpfc: Remove extra atomic_inc on cmd_pending in queuecommand after VMID Date: Mon, 15 Aug 2022 20:05:48 +0200 Message-Id: <20220815180407.487035010@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: James Smart [ Upstream commit 0948a9c5386095baae4012190a6b65aba684a907 ] 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: 33c79741deaf ("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 --- drivers/scsi/lpfc/lpfc_scsi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index b43dfcb81185..7da8e4c845df 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)) -- 2.35.1