summaryrefslogtreecommitdiff
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2024-02-15 22:57:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-05-17 12:47:59 +0300
commitafdbc21a92a0cdc497d8879aeff7b284094fae02 (patch)
tree8da7ac82d3f458150f4ac0b52823e9317406bccc /fs/nfs/inode.c
parent6eef21eb7a165601882dad0419a630e32d2d7a2c (diff)
downloadlinux-afdbc21a92a0cdc497d8879aeff7b284094fae02.tar.xz
nfs: make the rpc_stat per net namespace
[ Upstream commit 1548036ef1204df65ca5a16e8b199c858cb80075 ] Now that we're exposing the rpc stats on a per-network namespace basis, move this struct into struct nfs_net and use that to make sure only the per-network namespace stats are exposed. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Stable-dep-of: 24457f1be29f ("nfs: Handle error of rpc_proc_register() in nfs_net_init().") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 51c721e2f555..4ae50340c115 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -2225,8 +2225,10 @@ EXPORT_SYMBOL_GPL(nfs_net_id);
static int nfs_net_init(struct net *net)
{
+ struct nfs_net *nn = net_generic(net, nfs_net_id);
+
nfs_clients_init(net);
- rpc_proc_register(net, &nfs_rpcstat);
+ rpc_proc_register(net, &nn->rpcstats);
return nfs_fs_proc_net_init(net);
}