diff options
author | Guvenc Gulce <guvenc@linux.ibm.com> | 2021-08-09 11:05:57 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-09 10:46:59 +0100 |
commit | 64513d269e8971aabb7e787955a1b320e3031306 (patch) | |
tree | 3cc6fe63386e7c658b0ec68e9b3dc58c520bbda9 /net/smc/smc_core.c | |
parent | 8f3d65c166797746455553f4eaf74a5f89f996d4 (diff) | |
download | lwn-64513d269e8971aabb7e787955a1b320e3031306.tar.gz lwn-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.c | 4 |
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; |