]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: simplify wait when closing listen socket
authorUrsula Braun <ubraun@linux.vnet.ibm.com>
Tue, 13 Mar 2018 09:41:54 +0000 (10:41 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Mar 2018 13:49:13 +0000 (09:49 -0400)
commit87ed902082fc76d9d5922ccb259c1b0713e2f2c2
tree1db2e80c9656338b5edf75e163abcd3c9863dbdf
parentbc434b1276ecc63078cd788bf52b22cdac2b70cd
net/smc: simplify wait when closing listen socket

Closing of a listen socket wakes up kernel_accept() of
smc_tcp_listen_worker(), and then has to wait till smc_tcp_listen_worker()
gives up the internal clcsock. The wait logic introduced with
commit 6f0a6522a1b7 ("net/smc: release clcsock from tcp_listen_worker")
might wait longer than necessary. This patch implements the idea to
implement the wait just with flush_work(), and gets rid of the extra
smc_close_wait_listen_clcsock() function.

Fixes: 6f0a6522a1b7 ("net/smc: release clcsock from tcp_listen_worker")
Reported-by: Hans Wippel <hwippel@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/af_smc.c
net/smc/smc_close.c