aboutsummaryrefslogtreecommitdiffstats
path: root/net/smc/smc_core.c
diff options
context:
space:
mode:
authorGuvenc Gulce <guvenc@linux.ibm.com>2021-08-09 11:05:57 +0200
committerDavid S. Miller <davem@davemloft.net>2021-08-09 10:46:59 +0100
commit64513d269e8971aabb7e787955a1b320e3031306 (patch)
tree3cc6fe63386e7c658b0ec68e9b3dc58c520bbda9 /net/smc/smc_core.c
parentnet/smc: fix wait on already cleared link (diff)
downloadlinux-dev-64513d269e8971aabb7e787955a1b320e3031306.tar.xz
linux-dev-64513d269e8971aabb7e787955a1b320e3031306.zip
net/smc: Correct smc link connection counter in case of smc client
SMC clients may be assigned to a different link after the initial connection between two peers was established. In such a case, the connection counter was not correctly set. Update the connection counter correctly when a smc client connection is assigned to a different smc link. Fixes: 07d51580ff65 ("net/smc: Add connection counters for links") Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com> Tested-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_core.c')
-rw-r--r--net/smc/smc_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c
index cd0d7c908b2a..c160ff50c053 100644
--- a/net/smc/smc_core.c
+++ b/net/smc/smc_core.c
@@ -917,8 +917,8 @@ static int smc_switch_cursor(struct smc_sock *smc, struct smc_cdc_tx_pend *pend,
return rc;
}
-static void smc_switch_link_and_count(struct smc_connection *conn,
- struct smc_link *to_lnk)
+void smc_switch_link_and_count(struct smc_connection *conn,
+ struct smc_link *to_lnk)
{
atomic_dec(&conn->lnk->conn_cnt);
conn->lnk = to_lnk;