diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-06-19 22:17:57 +0200 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-06-20 01:20:12 +0200 |
commit | 4876cc779ff525b9c2376d8076edf47815e71f2c (patch) | |
tree | 9e9eecb8c4cc2c79a19104e4a9846d4f330ed40d /net/sunrpc/xprt.c | |
parent | SUNRPC: Handle connection issues correctly on the back channel (diff) | |
download | linux-4876cc779ff525b9c2376d8076edf47815e71f2c.tar.xz linux-4876cc779ff525b9c2376d8076edf47815e71f2c.zip |
SUNRPC: Ensure we release the TCP socket once it has been closed
This fixes a regression introduced by commit caf4ccd4e88cf2 ("SUNRPC:
Make xs_tcp_close() do a socket shutdown rather than a sock_release").
Prior to that commit, the autoclose feature would ensure that an
idle connection would result in the socket being both disconnected and
released, whereas now only gets disconnected.
While the current behaviour is harmless, it does leave the port bound
until either RPC traffic resumes or the RPC client is shut down.
Reported-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r-- | net/sunrpc/xprt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 3ca31f20b97c..ab5dd621ae0c 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c @@ -611,8 +611,8 @@ static void xprt_autoclose(struct work_struct *work) struct rpc_xprt *xprt = container_of(work, struct rpc_xprt, task_cleanup); - xprt->ops->close(xprt); clear_bit(XPRT_CLOSE_WAIT, &xprt->state); + xprt->ops->close(xprt); xprt_release_write(xprt, NULL); } |