net/smc: fix work request handling
Wait for pending sends only when smc_switch_conns() found a link to move
the connections to. Do not wait during link freeing, this can lead to
permanent hang situations. And refuse to provide a new tx slot on an
unusable link.
Fixes: c6f02ebeea
("net/smc: switch connections to alternate link")
Reviewed-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>
This commit is contained in:

committed by
David S. Miller

parent
6778a6bed0
commit
b7eede7578
@@ -1241,8 +1241,8 @@ static void smc_llc_process_cli_delete_link(struct smc_link_group *lgr)
|
||||
smc_llc_send_message(lnk, &qentry->msg); /* response */
|
||||
|
||||
if (smc_link_downing(&lnk_del->state)) {
|
||||
smc_switch_conns(lgr, lnk_del, false);
|
||||
smc_wr_tx_wait_no_pending_sends(lnk_del);
|
||||
if (smc_switch_conns(lgr, lnk_del, false))
|
||||
smc_wr_tx_wait_no_pending_sends(lnk_del);
|
||||
}
|
||||
smcr_link_clear(lnk_del, true);
|
||||
|
||||
@@ -1316,8 +1316,8 @@ static void smc_llc_process_srv_delete_link(struct smc_link_group *lgr)
|
||||
goto out; /* asymmetric link already deleted */
|
||||
|
||||
if (smc_link_downing(&lnk_del->state)) {
|
||||
smc_switch_conns(lgr, lnk_del, false);
|
||||
smc_wr_tx_wait_no_pending_sends(lnk_del);
|
||||
if (smc_switch_conns(lgr, lnk_del, false))
|
||||
smc_wr_tx_wait_no_pending_sends(lnk_del);
|
||||
}
|
||||
if (!list_empty(&lgr->list)) {
|
||||
/* qentry is either a request from peer (send it back to
|
||||
|
Reference in New Issue
Block a user