Skip to content

Commit 2c1d3e5

Browse files
Ursula Braundavem330
authored andcommitted
net/smc: abnormal termination without orderly flag
For abnormal termination issue an LLC DELETE_LINK without the orderly flag. Signed-off-by: Ursula Braun <[email protected]> Signed-off-by: Karsten Graul <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 15e1b99 commit 2c1d3e5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

net/smc/smc_core.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ static void smc_lgr_unregister_conn(struct smc_connection *conn)
161161
* of the DELETE LINK sequence from server; or as server to
162162
* initiate the delete processing. See smc_llc_rx_delete_link().
163163
*/
164-
static int smc_link_send_delete(struct smc_link *lnk)
164+
static int smc_link_send_delete(struct smc_link *lnk, bool orderly)
165165
{
166166
if (lnk->state == SMC_LNK_ACTIVE &&
167-
!smc_llc_send_delete_link(lnk, SMC_LLC_REQ, true)) {
167+
!smc_llc_send_delete_link(lnk, SMC_LLC_REQ, orderly)) {
168168
smc_llc_link_deleting(lnk);
169169
return 0;
170170
}
@@ -201,7 +201,7 @@ static void smc_lgr_free_work(struct work_struct *work)
201201
if (!lgr->is_smcd && !lgr->terminating) {
202202
/* try to send del link msg, on error free lgr immediately */
203203
if (lnk->state == SMC_LNK_ACTIVE &&
204-
!smc_link_send_delete(lnk)) {
204+
!smc_link_send_delete(lnk, true)) {
205205
/* reschedule in case we never receive a response */
206206
smc_lgr_schedule_free_work(lgr);
207207
spin_unlock_bh(lgr_lock);
@@ -1233,9 +1233,7 @@ static void smc_lgrs_shutdown(void)
12331233
if (!lgr->is_smcd) {
12341234
struct smc_link *lnk = &lgr->lnk[SMC_SINGLE_LINK];
12351235

1236-
if (lnk->state == SMC_LNK_ACTIVE)
1237-
smc_llc_send_delete_link(lnk, SMC_LLC_REQ,
1238-
false);
1236+
smc_link_send_delete(&lgr->lnk[SMC_SINGLE_LINK], false);
12391237
smc_llc_link_inactive(lnk);
12401238
}
12411239
cancel_delayed_work_sync(&lgr->free_work);

0 commit comments

Comments
 (0)