mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 07:50:04 +00:00
SUNRPC: add netns refcount tracker to struct rpc_xprt
Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9b1831e56c
commit
b9a0d6d143
@ -284,6 +284,7 @@ struct rpc_xprt {
|
||||
} stat;
|
||||
|
||||
struct net *xprt_net;
|
||||
netns_tracker ns_tracker;
|
||||
const char *servername;
|
||||
const char *address_strings[RPC_DISPLAY_MAX];
|
||||
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
|
||||
|
@ -1835,7 +1835,7 @@ EXPORT_SYMBOL_GPL(xprt_alloc);
|
||||
|
||||
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_id(xprt);
|
||||
rpc_sysfs_xprt_destroy(xprt);
|
||||
@ -2027,7 +2027,7 @@ static void xprt_init(struct rpc_xprt *xprt, struct net *net)
|
||||
|
||||
xprt_init_xid(xprt);
|
||||
|
||||
xprt->xprt_net = get_net(net);
|
||||
xprt->xprt_net = get_net_track(net, &xprt->ns_tracker, GFP_KERNEL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user