|
32 | 32 |
|
33 | 33 | static u32 smc_lgr_num; /* unique link group number */ |
34 | 34 |
|
| 35 | +static void smc_lgr_schedule_free_work(struct smc_link_group *lgr) |
| 36 | +{ |
| 37 | + /* client link group creation always follows the server link group |
| 38 | + * creation. For client use a somewhat higher removal delay time, |
| 39 | + * otherwise there is a risk of out-of-sync link groups. |
| 40 | + */ |
| 41 | + mod_delayed_work(system_wq, &lgr->free_work, |
| 42 | + lgr->role == SMC_CLNT ? SMC_LGR_FREE_DELAY_CLNT : |
| 43 | + SMC_LGR_FREE_DELAY_SERV); |
| 44 | +} |
| 45 | + |
35 | 46 | /* Register connection's alert token in our lookup structure. |
36 | 47 | * To use rbtrees we have to implement our own insert core. |
37 | 48 | * Requires @conns_lock |
@@ -111,13 +122,7 @@ static void smc_lgr_unregister_conn(struct smc_connection *conn) |
111 | 122 | write_unlock_bh(&lgr->conns_lock); |
112 | 123 | if (!reduced || lgr->conns_num) |
113 | 124 | return; |
114 | | - /* client link group creation always follows the server link group |
115 | | - * creation. For client use a somewhat higher removal delay time, |
116 | | - * otherwise there is a risk of out-of-sync link groups. |
117 | | - */ |
118 | | - mod_delayed_work(system_wq, &lgr->free_work, |
119 | | - lgr->role == SMC_CLNT ? SMC_LGR_FREE_DELAY_CLNT : |
120 | | - SMC_LGR_FREE_DELAY_SERV); |
| 125 | + smc_lgr_schedule_free_work(lgr); |
121 | 126 | } |
122 | 127 |
|
123 | 128 | static void smc_lgr_free_work(struct work_struct *work) |
@@ -344,6 +349,7 @@ void smc_lgr_terminate(struct smc_link_group *lgr) |
344 | 349 | } |
345 | 350 | write_unlock_bh(&lgr->conns_lock); |
346 | 351 | wake_up(&lgr->lnk[SMC_SINGLE_LINK].wr_reg_wait); |
| 352 | + smc_lgr_schedule_free_work(lgr); |
347 | 353 | } |
348 | 354 |
|
349 | 355 | /* Determine vlan of internal TCP socket. |
|
0 commit comments