diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/smc/smc_close.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/smc/smc_close.c b/net/smc/smc_close.c index ea2b87f29469..e25c023582f9 100644 --- a/net/smc/smc_close.c +++ b/net/smc/smc_close.c @@ -202,6 +202,12 @@ again: if (rc) break; sk->sk_state = SMC_PEERCLOSEWAIT1; + + /* actively shutdown clcsock before peer close it, + * prevent peer from entering TIME_WAIT state. + */ + if (smc->clcsock && smc->clcsock->sk) + rc = kernel_sock_shutdown(smc->clcsock, SHUT_RDWR); } else { /* peer event has changed the state */ goto again; |