Commit b9a0d6d1 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

SUNRPC: add netns refcount tracker to struct rpc_xprt

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9b1831e5
...@@ -284,6 +284,7 @@ struct rpc_xprt { ...@@ -284,6 +284,7 @@ struct rpc_xprt {
} stat; } stat;
struct net *xprt_net; struct net *xprt_net;
netns_tracker ns_tracker;
const char *servername; const char *servername;
const char *address_strings[RPC_DISPLAY_MAX]; const char *address_strings[RPC_DISPLAY_MAX];
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) #if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
......
...@@ -1835,7 +1835,7 @@ EXPORT_SYMBOL_GPL(xprt_alloc); ...@@ -1835,7 +1835,7 @@ EXPORT_SYMBOL_GPL(xprt_alloc);
void xprt_free(struct rpc_xprt *xprt) void xprt_free(struct rpc_xprt *xprt)
{ {
put_net(xprt->xprt_net); put_net_track(xprt->xprt_net, &xprt->ns_tracker);
xprt_free_all_slots(xprt); xprt_free_all_slots(xprt);
xprt_free_id(xprt); xprt_free_id(xprt);
rpc_sysfs_xprt_destroy(xprt); rpc_sysfs_xprt_destroy(xprt);
...@@ -2027,7 +2027,7 @@ static void xprt_init(struct rpc_xprt *xprt, struct net *net) ...@@ -2027,7 +2027,7 @@ static void xprt_init(struct rpc_xprt *xprt, struct net *net)
xprt_init_xid(xprt); xprt_init_xid(xprt);
xprt->xprt_net = get_net(net); xprt->xprt_net = get_net_track(net, &xprt->ns_tracker, GFP_KERNEL);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment