Skip to content

Commit

Permalink
net/smc: Remove redundant refcount increase
Browse files Browse the repository at this point in the history
For passive connections, the refcount increment has been done in
smc_clcsock_accept()-->smc_sock_alloc().

Fixes: 3b2dec2 ("net/smc: restructure client and server code in af_smc")
Signed-off-by: Yacan Liu <liuyacan@corp.netease.com>
Reviewed-by: Tony Lu <tonylu@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220830152314.838736-1-liuyacan@corp.netease.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Yacan Liu authored and Paolo Abeni committed Sep 1, 2022
1 parent 0b4f688 commit a8424a9
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/smc/af_smc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit a8424a9

Please sign in to comment.