summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/stats.c
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2011-12-06 16:42:49 +0300
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-01-31 19:28:18 -0500
commit246590f56c9f281d60b7dd7efa0818307e65600d (patch)
treeaa48cef874939af0de0e78bf51d983e3ed8d50f6 /fs/nfsd/stats.c
parentcc9f4be5ffb86b4b483eeb15eb08aebc60a1b9a9 (diff)
downloadop-kernel-dev-246590f56c9f281d60b7dd7efa0818307e65600d.zip
op-kernel-dev-246590f56c9f281d60b7dd7efa0818307e65600d.tar.gz
SUNRPC: register service stats /proc entries in passed network namespace context
This patch makes it possible to create NFSd program entry ("/proc/net/rpc/nfsd") in passed network namespace context instead of hard-coded "init_net". Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfsd/stats.c')
-rw-r--r--fs/nfsd/stats.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfsd/stats.c b/fs/nfsd/stats.c
index a2e2402..6d4521f 100644
--- a/fs/nfsd/stats.c
+++ b/fs/nfsd/stats.c
@@ -25,6 +25,7 @@
#include <linux/module.h>
#include <linux/sunrpc/stats.h>
#include <linux/nfsd/stats.h>
+#include <net/net_namespace.h>
#include "nfsd.h"
@@ -94,11 +95,11 @@ static const struct file_operations nfsd_proc_fops = {
void
nfsd_stat_init(void)
{
- svc_proc_register(&nfsd_svcstats, &nfsd_proc_fops);
+ svc_proc_register(&init_net, &nfsd_svcstats, &nfsd_proc_fops);
}
void
nfsd_stat_shutdown(void)
{
- svc_proc_unregister("nfsd");
+ svc_proc_unregister(&init_net, "nfsd");
}
OpenPOWER on IntegriCloud