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)
commit3d502067599f0db12e74e6646aee8728efe3e5be
tree1db2e80c9656338b5edf75e163abcd3c9863dbdf
parentcf55612a945039476abfd73e39064b2e721c3272
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 127f49705823 ("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: 127f49705823 ("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