Message ID | 20200217152455.15341-4-ubraun@linux.ibm.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | net/smc: patches 2020-02-17 | expand |
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c index 8f3c1fced334..9b92b52952dd 100644 --- a/net/smc/smc_core.c +++ b/net/smc/smc_core.c @@ -629,7 +629,7 @@ void smc_lgr_terminate(struct smc_link_group *lgr, bool soft) smc_lgr_list_head(lgr, &lgr_lock); spin_lock_bh(lgr_lock); - if (lgr->terminating) { + if (list_empty(&lgr->list) || lgr->terminating || lgr->freeing) { spin_unlock_bh(lgr_lock); return; /* lgr already terminating */ }