diff options
author | Ursula Braun <ubraun@linux.ibm.com> | 2019-11-14 15:02:47 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-15 23:28:28 +0300 |
commit | 0b29ec6436138721acf5844e558f7334a0fa61d5 (patch) | |
tree | 1b95d5509f485e0a076e9200e247265e33ba6add /net/smc/smc_llc.c | |
parent | 6a37ad3da5d64a632d03a8dc272c65e706cc7160 (diff) | |
download | linux-0b29ec6436138721acf5844e558f7334a0fa61d5.tar.xz |
net/smc: immediate termination for SMCR link groups
If the SMC module is unloaded or an IB device is thrown away, the
immediate link group freeing introduced for SMCD is exploited for SMCR
as well. That means SMCR-specifics are added to smc_conn_kill().
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_llc.c')
-rw-r--r-- | net/smc/smc_llc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c index 8d1b076021ed..a9f6431dd69a 100644 --- a/net/smc/smc_llc.c +++ b/net/smc/smc_llc.c @@ -698,9 +698,11 @@ int smc_llc_do_confirm_rkey(struct smc_link *link, int smc_llc_do_delete_rkey(struct smc_link *link, struct smc_buf_desc *rmb_desc) { - int rc; + int rc = 0; mutex_lock(&link->llc_delete_rkey_mutex); + if (link->state != SMC_LNK_ACTIVE) + goto out; reinit_completion(&link->llc_delete_rkey); rc = smc_llc_send_delete_rkey(link, rmb_desc); if (rc) |