summaryrefslogtreecommitdiff
path: root/net/smc/smc_core.c
diff options
context:
space:
mode:
authorKarsten Graul <kgraul@linux.ibm.com>2020-04-29 18:10:45 +0300
committerDavid S. Miller <davem@davemloft.net>2020-04-29 22:26:32 +0300
commit2140ac26f8f501d3cc8f1575e6419f1a50779496 (patch)
treeb19a2b0e88fbf64e9b1345ee5168295db59ab9c9 /net/smc/smc_core.c
parent1020e1ef53ceef715f2bc144eebbfe01e88effcf (diff)
downloadlinux-2140ac26f8f501d3cc8f1575e6419f1a50779496.tar.xz
net/smc: simplify link deactivation
Cancel the testlink worker during link clear processing and remove the extra function smc_llc_link_inactive(). Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Reviewed-by: Ursula Braun <ubraun@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.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c
index 57890cbd4e8a..78ccfbf6e4af 100644
--- a/net/smc/smc_core.c
+++ b/net/smc/smc_core.c
@@ -261,7 +261,7 @@ static void smc_lgr_free_work(struct work_struct *work)
struct smc_link *lnk = &lgr->lnk[i];
if (smc_link_usable(lnk))
- smc_llc_link_inactive(lnk);
+ lnk->state = SMC_LNK_INACTIVE;
}
}
smc_lgr_free(lgr);
@@ -692,7 +692,7 @@ static void smc_lgr_cleanup(struct smc_link_group *lgr)
struct smc_link *lnk = &lgr->lnk[i];
if (smc_link_usable(lnk))
- smc_llc_link_inactive(lnk);
+ lnk->state = SMC_LNK_INACTIVE;
}
}
}
@@ -706,16 +706,12 @@ static void __smc_lgr_terminate(struct smc_link_group *lgr, bool soft)
struct smc_connection *conn;
struct smc_sock *smc;
struct rb_node *node;
- int i;
if (lgr->terminating)
return; /* lgr already terminating */
if (!soft)
cancel_delayed_work_sync(&lgr->free_work);
lgr->terminating = 1;
- if (!lgr->is_smcd)
- for (i = 0; i < SMC_LINKS_PER_LGR_MAX; i++)
- smc_llc_link_inactive(&lgr->lnk[i]);
/* kill remaining link group connections */
read_lock_bh(&lgr->conns_lock);