Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4361004rwe; Tue, 30 Aug 2022 08:48:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR7xsxdBo5NEwJnuitOw1CTqDfI/sCSIaxbyB2J4jUwHdohdSAQWFhcR0ERztP7E8rxhF+cq X-Received: by 2002:a17:90b:3b8a:b0:1f5:56c3:54ac with SMTP id pc10-20020a17090b3b8a00b001f556c354acmr24780829pjb.2.1661874485567; Tue, 30 Aug 2022 08:48:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661874485; cv=none; d=google.com; s=arc-20160816; b=WN946MowcmJfChMIp0KIuuPna7hC1qV8Sn8DnkYV1kcOOzG1L3H2uvFcOmo5C3YCPO 1/g/yUaeZyqfuwKhhA/6RIZBe42hUU0FylJRi61fnQkBLHFOcYLfHyydurA7BWt3/Per O/yqbkd5i0B1UHMu1CWixUGYrHQrr4S1PQTLxoC55oMsNPJGMaJqSWD7BMNWsdA/9dca X6bCHNKnlBdl6xUKGkexKrfL0gynPX4LNrG5rpKwZ28czCr+pWihqSDBW1PDKT+MKsCV P4ZWmzKVkoK2gpm19/YmHA6wLfXDY4y/sWBxmv6knsOSlnsAnF7zT8iPigzMCbjwwXH1 eEow== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=czJTLBpE0tloFZmYSS2AFw3bPxWy7e6kJqYwgdeEzv4=; b=0zpPn/QE+kKFfFk1npdniTDI28UEPPxPuFJjqsf4sC3/NnjEsASB7wWz2pH+QyMgDf e13YKje1hqQ7Js9PKkpHsEhF5vlCrGNKM0SFdEN5pqn4y3gkChdJSitkxGqV0c1EzR0P AgBEOqSfKYKfGe1rIs3Yzx948aZBKbxre5yYXxKIISdEVi7xwBqjny/+0UDzYoPjxtpp ev7qJGT3SCjEqrhLCR/IXe7wbYRut9wSrDywervQjG7e823hyDzcUTPMPJewkhQjgT+0 o/nhXK5OzPnH4mcCGZg29OnRTOUjmzRqNu6hBRacNWdUxg0LrSmx7bpRa0+p5lWwSlb7 uUgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@corp.netease.com header.s=s210401 header.b=eyAKvZ7b; 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=corp.netease.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f9-20020a17090274c900b0016ed8e1897bsi11069219plt.554.2022.08.30.08.47.54; Tue, 30 Aug 2022 08:48:05 -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=@corp.netease.com header.s=s210401 header.b=eyAKvZ7b; 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=corp.netease.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229720AbiH3PX7 (ORCPT + 99 others); Tue, 30 Aug 2022 11:23:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229923AbiH3PXy (ORCPT ); Tue, 30 Aug 2022 11:23:54 -0400 Received: from corp-front07-corp.i.nease.net (corp-front07-corp.i.nease.net [59.111.134.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3760512F55C; Tue, 30 Aug 2022 08:23:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corp.netease.com; s=s210401; h=Received:From:To:Cc:Subject: Date:Message-Id:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=czJTLBpE0tloFZmYSS2AFw3bPxWy7e6kJq YwgdeEzv4=; b=eyAKvZ7bP5lCinzXZ3TLZqvvDVy+ixk6mX2QqAUeFAD5UBb5MC DKNEwwscxIjvV268duvoKI7H//Eu7w8cuux3YOXktATf6pBxE33OEzx6hveFV5Tm CCP3+hWs4I8IyVDvfGW7Oy5pAnU5g8Mqzj4wOc8/sUbPMe2gRysk/YeDA= Received: from pubt1-k8s74.yq.163.org (unknown [115.238.122.38]) by corp-front07-corp.i.nease.net (Coremail) with SMTP id nRDICgA3jOhoKw5j3AUVAA--.38750S2; Tue, 30 Aug 2022 23:23:20 +0800 (HKT) From: liuyacan@corp.netease.com To: tonylu@linux.alibaba.com Cc: davem@davemloft.net, edumazet@google.com, kgraul@linux.ibm.com, kuba@kernel.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, liuyacan@corp.netease.com, netdev@vger.kernel.org, pabeni@redhat.com, wenjia@linux.ibm.com, hwippel@linux.ibm.com, ubraun@linux.ibm.com Subject: [PATCH net v2] net/smc: Remove redundant refcount increase Date: Tue, 30 Aug 2022 23:23:14 +0800 Message-Id: <20220830152314.838736-1-liuyacan@corp.netease.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: nRDICgA3jOhoKw5j3AUVAA--.38750S2 X-Coremail-Antispam: 1UD129KBjvdXoW7Jr1xuF1kAFWxWr4kXw4Utwb_yoW3Zrc_K3 47GFnrWa1jyFZayw4fG393uwsaqw1kJr48Xrn5ArZ0y3Wjvr48Can8Crn8uw15u3yYyF13 Jr45tFZYgw12yjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbtAYjxAI6xCIbckI1I0E57IF64kEYxAxM7AC8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0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,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: Yacan Liu For passive connections, the refcount increment has been done in smc_clcsock_accept()-->smc_sock_alloc(). Fixes: 3b2dec2603d5 ("net/smc: restructure client and server code in af_smc") Signed-off-by: Yacan Liu --- Change in v2: -- Tune commit message --- net/smc/af_smc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index 79c1318af..0939cc3b9 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -1855,7 +1855,6 @@ static void smc_listen_out_connected(struct smc_sock *new_smc) { struct sock *newsmcsk = &new_smc->sk; - sk_refcnt_debug_inc(newsmcsk); if (newsmcsk->sk_state == SMC_INIT) newsmcsk->sk_state = SMC_ACTIVE; -- 2.20.1