]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sunrpc/stats.c
svc: Add per-transport delete functions
[linux-2.6-omap-h63xx.git] / net / sunrpc / stats.c
index bd98124c3a649b97508685cd2f87b4813aeb83b7..74df2d358e61ba5eb77a806a2cb1d58e163dd7de 100644 (file)
 
 #include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/sunrpc/clnt.h>
 #include <linux/sunrpc/svcsock.h>
 #include <linux/sunrpc/metrics.h>
+#include <net/net_namespace.h>
 
 #define RPCDBG_FACILITY        RPCDBG_MISC
 
@@ -66,7 +66,7 @@ static int rpc_proc_open(struct inode *inode, struct file *file)
        return single_open(file, rpc_proc_show, PDE(inode)->data);
 }
 
-static struct file_operations rpc_proc_fops = {
+static const struct file_operations rpc_proc_fops = {
        .owner = THIS_MODULE,
        .open = rpc_proc_open,
        .read  = seq_read,
@@ -118,7 +118,7 @@ struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt)
        new = kcalloc(clnt->cl_maxproc, sizeof(struct rpc_iostats), GFP_KERNEL);
        return new;
 }
-EXPORT_SYMBOL(rpc_alloc_iostats);
+EXPORT_SYMBOL_GPL(rpc_alloc_iostats);
 
 /**
  * rpc_free_iostats - release an rpc_iostats structure
@@ -129,7 +129,7 @@ void rpc_free_iostats(struct rpc_iostats *stats)
 {
        kfree(stats);
 }
-EXPORT_SYMBOL(rpc_free_iostats);
+EXPORT_SYMBOL_GPL(rpc_free_iostats);
 
 /**
  * rpc_count_iostats - tally up per-task stats
@@ -215,7 +215,7 @@ void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt)
                                metrics->om_execute * MILLISECS_PER_JIFFY);
        }
 }
-EXPORT_SYMBOL(rpc_print_iostats);
+EXPORT_SYMBOL_GPL(rpc_print_iostats);
 
 /*
  * Register/unregister RPC proc files
@@ -226,7 +226,7 @@ do_register(const char *name, void *data, const struct file_operations *fops)
        struct proc_dir_entry *ent;
 
        rpc_proc_init();
-       dprintk("RPC: registering /proc/net/rpc/%s\n", name);
+       dprintk("RPC:       registering /proc/net/rpc/%s\n", name);
 
        ent = create_proc_entry(name, 0, proc_net_rpc);
        if (ent) {
@@ -241,12 +241,14 @@ rpc_proc_register(struct rpc_stat *statp)
 {
        return do_register(statp->program->name, statp, &rpc_proc_fops);
 }
+EXPORT_SYMBOL_GPL(rpc_proc_register);
 
 void
 rpc_proc_unregister(const char *name)
 {
        remove_proc_entry(name, proc_net_rpc);
 }
+EXPORT_SYMBOL_GPL(rpc_proc_unregister);
 
 struct proc_dir_entry *
 svc_proc_register(struct svc_stat *statp, const struct file_operations *fops)
@@ -263,10 +265,10 @@ svc_proc_unregister(const char *name)
 void
 rpc_proc_init(void)
 {
-       dprintk("RPC: registering /proc/net/rpc\n");
+       dprintk("RPC:       registering /proc/net/rpc\n");
        if (!proc_net_rpc) {
                struct proc_dir_entry *ent;
-               ent = proc_mkdir("rpc", proc_net);
+               ent = proc_mkdir("rpc", init_net.proc_net);
                if (ent) {
                        ent->owner = THIS_MODULE;
                        proc_net_rpc = ent;
@@ -277,10 +279,10 @@ rpc_proc_init(void)
 void
 rpc_proc_exit(void)
 {
-       dprintk("RPC: unregistering /proc/net/rpc\n");
+       dprintk("RPC:       unregistering /proc/net/rpc\n");
        if (proc_net_rpc) {
                proc_net_rpc = NULL;
-               remove_proc_entry("net/rpc", NULL);
+               remove_proc_entry("rpc", init_net.proc_net);
        }
 }