diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2011-12-06 13:42:49 (GMT) |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-02-01 00:28:18 (GMT) |
commit | 246590f56c9f281d60b7dd7efa0818307e65600d (patch) | |
tree | aa48cef874939af0de0e78bf51d983e3ed8d50f6 /fs | |
parent | cc9f4be5ffb86b4b483eeb15eb08aebc60a1b9a9 (diff) | |
download | linux-fsl-qoriq-246590f56c9f281d60b7dd7efa0818307e65600d.tar.xz |
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')
-rw-r--r-- | fs/nfsd/stats.c | 5 |
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"); } |