Commit 68fd8942 authored by Karsten Graul's avatar Karsten Graul Committed by David S. Miller

net/smc: clear link during SMC client link down processing

In a link-down condition we notify the SMC server and expect that the
server will finally trigger the link clear processing on the client
side. This could fail when anything along this notification path goes
wrong. Clear the link as part of SMC client link-down processing to
prevent dangling links.
Reviewed-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
Fixes: 541afa10 ("net/smc: add smcr_port_err() and smcr_link_down() processing")
Signed-off-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a35fffbf
...@@ -1204,10 +1204,12 @@ static void smcr_link_down(struct smc_link *lnk) ...@@ -1204,10 +1204,12 @@ static void smcr_link_down(struct smc_link *lnk)
SMC_LLC_WAIT_TIME); SMC_LLC_WAIT_TIME);
mutex_lock(&lgr->llc_conf_mutex); mutex_lock(&lgr->llc_conf_mutex);
} }
if (!list_empty(&lgr->list)) if (!list_empty(&lgr->list)) {
smc_llc_send_delete_link(to_lnk, del_link_id, smc_llc_send_delete_link(to_lnk, del_link_id,
SMC_LLC_REQ, true, SMC_LLC_REQ, true,
SMC_LLC_DEL_LOST_PATH); SMC_LLC_DEL_LOST_PATH);
smcr_link_clear(lnk, true);
}
wake_up(&lgr->llc_flow_waiter); /* wake up next waiter */ wake_up(&lgr->llc_flow_waiter); /* wake up next waiter */
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment