Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2893967rwb; Mon, 15 Aug 2022 13:29:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR4gkSjrrzfhn05mBBoQ54VRJ4k/DcjXlShm4OK/SSZ+oSbhJitaJwqKlXCCCSMsoASO7ivc X-Received: by 2002:a50:c312:0:b0:43d:962d:7db6 with SMTP id a18-20020a50c312000000b0043d962d7db6mr16491455edb.261.1660595362290; Mon, 15 Aug 2022 13:29:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660595362; cv=none; d=google.com; s=arc-20160816; b=vjLYavFJybGzLaxRtWMlGXk52Pw6hr1moxeqqiSGL4lGiM6XedXFPn6SCLfVlVNzRG 6RDDLXL2rJKZ0n2XFbB6LmvLAC7ME7LUWKnS57QrdQiUOOB/sHWWCpFWFM1C2IakxJtC XpA7x933hhwBs3buB0QUZVjwN70ymcYKGpiQDo60evV8WOjJglQVxWOXiWB6bCyIVLaz /O28HoeC9cI/cKAYUA+NPwM8I9vA+MFp1oh7Lmb8EXEv/I0Rw/6dfffPvmaPZvJtchf3 c7/kKQAeOFzBcYreZuRPmF4sxE8UYyKJ7vdwi+bEPTrTy+pJPL11Bdq+v71Wronxkqkz CfRA== 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=wTHCXAvBGSwD9w+hgm6UO6XryCogdbPlDlPdWJiJ4kQ=; b=KwUt7Bs4NX38joz0qEYGXd4qTgr/rl5XqTWhVqrht9btQLvh6ec6g383fjtEEcmt/7 OjYdLZH/Ufn88AL3cktooLEzHm+CsRv831K6EVZD5Fhs4LK2xh1WfgcmbMYVHSJE34ow 05s1igJ1iNPWaDf+YKXniXdvRd9cfi0TyfreLBxk/uDQUZji/fiK1g9OeYuNAEbmqtVa sdxnGQQhjlHCLmXvhfJjBNlLjj7qoVdCe26W4iIqGAYUREA8jau659LKUMHADP80KFrQ cIF0rC7G2hblLTqflB2jxgVxr9f1B8OFkmPb4XBzH7TFKsEhbjF16SLANqbymYXnhlJ+ To9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="h3/CIWrB"; 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 h9-20020a05640250c900b0043e33c1d5eesi9460101edb.230.2022.08.15.13.28.50; Mon, 15 Aug 2022 13:29:22 -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="h3/CIWrB"; 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 S1347674AbiHOU0Y (ORCPT + 99 others); Mon, 15 Aug 2022 16:26:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346490AbiHOUUR (ORCPT ); Mon, 15 Aug 2022 16:20:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0396C979E8; Mon, 15 Aug 2022 12:00:52 -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 40621B8105C; Mon, 15 Aug 2022 19:00:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98324C433C1; Mon, 15 Aug 2022 19:00:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590050; bh=lg2+YsXQQBrsQ6BLKQMFy06zfZHh2gbqSTZ/yvTb1h8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h3/CIWrBJiGGYCHnzeq9G3ivdPTXTr6ri1R4IENQMbmg55APL+zWWk+KLhew7IKFM +aS2DtqT6xdZCPMk7uMz57i6ncnjLp2BW3XkviF6noMsYXmVq8p/rZ9M+palZLKHRc gfkiKbda2C4GsBeEVkuQh+kyNoPP5hDEY5a2XQx4= 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" Subject: [PATCH 5.18 0094/1095] scsi: lpfc: Remove extra atomic_inc on cmd_pending in queuecommand after VMID Date: Mon, 15 Aug 2022 19:51:33 +0200 Message-Id: <20220815180433.431250368@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 commit 0948a9c5386095baae4012190a6b65aba684a907 upstream. 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: Greg Kroah-Hartman --- drivers/scsi/lpfc/lpfc_scsi.c | 1 - 1 file changed, 1 deletion(-) --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -5710,7 +5710,6 @@ lpfc_queuecommand(struct Scsi_Host *shos 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))