Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361133
b: refs/heads/master
c: 190b1ec
h: refs/heads/master
i:
  361131: de6e727
v: v3
  • Loading branch information
J. Bruce Fields committed Mar 9, 2013
1 parent d3a6676 commit 70697c5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3c34ae11fac3b30629581d0bfaf80f58e82cfbfb
refs/heads/master: 190b1ecf257be308f0053c371fa7afa1ba5f4932
15 changes: 10 additions & 5 deletions trunk/net/sunrpc/xprtsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,14 @@ 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
Expand All @@ -862,10 +870,7 @@ static void xs_destroy(struct rpc_xprt *xprt)

cancel_delayed_work_sync(&transport->connect_worker);

xs_close(xprt);
xs_free_peer_addresses(xprt);
xprt_free(xprt);
module_put(THIS_MODULE);
xs_local_destroy(xprt);
}

static inline struct rpc_xprt *xprt_from_sock(struct sock *sk)
Expand Down Expand Up @@ -2482,7 +2487,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_destroy,
.destroy = xs_local_destroy,
.print_stats = xs_local_print_stats,
};

Expand Down

0 comments on commit 70697c5

Please sign in to comment.