]> 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)
commit0a10f07d85fd232fb550726c2f8671cac88b5186
tree1db2e80c9656338b5edf75e163abcd3c9863dbdf
parent8b344119825d6e4184729fc84d52f0bb9d94a7d7
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 5811a700456f ("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: 5811a700456f ("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