All of lore.kernel.org
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <20220830152314.838736-1-liuyacan@corp.netease.com> (raw)
In-Reply-To: <YwzirUcxlQW3ydT7@TonyMac-Alibaba>

From: Yacan Liu <liuyacan@corp.netease.com>

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 <liuyacan@corp.netease.com>

---
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


  reply	other threads:[~2022-08-30 15:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29 14:53 [PATCH net] net/smc: Remove redundant refcount increase liuyacan
2022-08-29 16:00 ` Tony Lu
2022-08-30 15:23   ` liuyacan [this message]
2022-09-01  6:49     ` [PATCH net v2] " Tony Lu
2022-09-01  8:20     ` patchwork-bot+netdevbpf
2022-09-01  5:42 ` [PATCH net] " Wenjia Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220830152314.838736-1-liuyacan@corp.netease.com \
    --to=liuyacan@corp.netease.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hwippel@linux.ibm.com \
    --cc=kgraul@linux.ibm.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tonylu@linux.alibaba.com \
    --cc=ubraun@linux.ibm.com \
    --cc=wenjia@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.