summaryrefslogtreecommitdiff
path: root/net/smc/af_smc.c
diff options
context:
space:
mode:
authorGuvenc Gulce <guvenc@linux.ibm.com>2021-08-09 12:05:57 +0300
committerDavid S. Miller <davem@davemloft.net>2021-08-09 12:46:59 +0300
commit64513d269e8971aabb7e787955a1b320e3031306 (patch)
tree3cc6fe63386e7c658b0ec68e9b3dc58c520bbda9 /net/smc/af_smc.c
parent8f3d65c166797746455553f4eaf74a5f89f996d4 (diff)
downloadlinux-64513d269e8971aabb7e787955a1b320e3031306.tar.xz
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/af_smc.c')
-rw-r--r--net/smc/af_smc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index 898389611ae8..c038efc23ce3 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -795,7 +795,7 @@ static int smc_connect_rdma(struct smc_sock *smc,
reason_code = SMC_CLC_DECL_NOSRVLINK;
goto connect_abort;
}
- smc->conn.lnk = link;
+ smc_switch_link_and_count(&smc->conn, link);
}
/* create send buffer and rmb */