From mboxrd@z Thu Jan 1 00:00:00 1970 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 92DFAC6FA83 for ; Tue, 6 Sep 2022 13:50:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238774AbiIFNsk (ORCPT ); Tue, 6 Sep 2022 09:48:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233899AbiIFNrS (ORCPT ); Tue, 6 Sep 2022 09:47:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21CF576449; Tue, 6 Sep 2022 06:39:08 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 2D8EB61548; Tue, 6 Sep 2022 13:38:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C9E2C433C1; Tue, 6 Sep 2022 13:38:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662471497; bh=i5iLGuCPNNPPV5K4WHZK0Ueay/YGIYTFwWb6ZbYxnH8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cCU5fz0f12S1soosy6TbYW1+zF9XoKC7JEy9u1499rlo5W7X088sS3himLceuSPly KcrfjopVB2hOjxVX7Mvf7L6kAVwN0ulIG9KWyy3jDVM48+WviKSNHHETAlBEQlXfGB +ORbJz1Dxkn315Dvz08bMTgBseHpwheYFIJcc/Gk= 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 5.15 029/107] net/smc: Remove redundant refcount increase Date: Tue, 6 Sep 2022 15:30:10 +0200 Message-Id: <20220906132823.032686732@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220906132821.713989422@linuxfoundation.org> References: <20220906132821.713989422@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.netease.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 2ddd7b34b4ce5..26f81e2e1dfba 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -1490,7 +1490,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.35.1