diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-10-31 14:18:49 +0100 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-10-31 14:31:17 +0100 |
commit | a1311d87fa034e0de580e3a65f2d5c2e7a1f55f3 (patch) | |
tree | 6a4cdfa1741a40d6c4872a793b1a1610390044ab /net/sunrpc | |
parent | SUNRPC: close a rare race in xs_tcp_setup_socket. (diff) | |
download | linux-a1311d87fa034e0de580e3a65f2d5c2e7a1f55f3.tar.xz linux-a1311d87fa034e0de580e3a65f2d5c2e7a1f55f3.zip |
SUNRPC: Cleanup xs_destroy()
There is no longer any need for a separate xs_local_destroy() helper.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/xprtsock.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index a4709bbf8e5e..17c88928b7db 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -856,14 +856,6 @@ static void xs_tcp_close(struct rpc_xprt *xprt) xs_tcp_shutdown(xprt); } -static void xs_local_destroy(struct rpc_xprt *xprt) -{ - xs_close(xprt); - xs_free_peer_addresses(xprt); - xprt_free(xprt); - module_put(THIS_MODULE); -} - /** * xs_destroy - prepare to shutdown a transport * @xprt: doomed transport @@ -873,7 +865,10 @@ static void xs_destroy(struct rpc_xprt *xprt) { dprintk("RPC: xs_destroy xprt %p\n", xprt); - xs_local_destroy(xprt); + xs_close(xprt); + xs_free_peer_addresses(xprt); + xprt_free(xprt); + module_put(THIS_MODULE); } static inline struct rpc_xprt *xprt_from_sock(struct sock *sk) @@ -2513,7 +2508,7 @@ static struct rpc_xprt_ops xs_local_ops = { .send_request = xs_local_send_request, .set_retrans_timeout = xprt_set_retrans_timeout_def, .close = xs_close, - .destroy = xs_local_destroy, + .destroy = xs_destroy, .print_stats = xs_local_print_stats, }; |