From nobody Thu Sep 4 03:11:14 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A54C6C54EE9 for ; Tue, 13 Sep 2022 15:07:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235177AbiIMPHN (ORCPT ); Tue, 13 Sep 2022 11:07:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232382AbiIMPEm (ORCPT ); Tue, 13 Sep 2022 11:04:42 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9E3C74E35; Tue, 13 Sep 2022 07:30:30 -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 6CD34B80EFA; Tue, 13 Sep 2022 14:30:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E15CAC433D6; Tue, 13 Sep 2022 14:30:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663079419; bh=Ts001EFLg14UM0gR5+RoL0k7mn87CWbDBOrEQf6oIpY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=snbkce+uwY5mBG/pPr1w6hFjDfRlS0sDDn6cIvJKh6AJEBofnwFUSOKR9n+Dt86bO FSendZynmSVkF+jQ8jEmeZQ0TGVP5LNpZbGMgVgjvFXIeIroXLj1d3WCMf/JrVdGo1 7gU06SKIMw4JS5AiVmlG+QD6zJ+1EnddVDJtcYoI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yacan Liu , Tony Lu , Paolo Abeni , Sasha Levin Subject: [PATCH 4.19 19/79] net/smc: Remove redundant refcount increase Date: Tue, 13 Sep 2022 16:06:37 +0200 Message-Id: <20220913140349.806693128@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913140348.835121645@linuxfoundation.org> References: <20220913140348.835121645@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Yacan Liu [ Upstream commit a8424a9b4522a3ab9f32175ad6d848739079071f ] 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 Reviewed-by: Tony Lu Link: https://lore.kernel.org/r/20220830152314.838736-1-liuyacan@corp.netea= se.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- 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 4c904ab29e0e6..dcd00b514c3f9 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -1031,7 +1031,6 @@ static void smc_listen_out_connected(struct smc_sock = *new_smc) { struct sock *newsmcsk =3D &new_smc->sk; =20 - sk_refcnt_debug_inc(newsmcsk); if (newsmcsk->sk_state =3D=3D SMC_INIT) newsmcsk->sk_state =3D SMC_ACTIVE; =20 --=20 2.35.1