]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sunrpc/sysctl.c
genirq: add unlocked version of set_irq_handler()
[linux-2.6-omap-h63xx.git] / net / sunrpc / sysctl.c
index 47d8df2b5eb2a94bf378704a748555efdcc86221..2be714e9b382742be19d7c628f292500d65f77ce 100644 (file)
@@ -35,14 +35,8 @@ static ctl_table             sunrpc_table[];
 void
 rpc_register_sysctl(void)
 {
-       if (!sunrpc_table_header) {
-               sunrpc_table_header = register_sysctl_table(sunrpc_table, 1);
-#ifdef CONFIG_PROC_FS
-               if (sunrpc_table[0].de)
-                       sunrpc_table[0].de->owner = THIS_MODULE;
-#endif
-       }
-
+       if (!sunrpc_table_header)
+               sunrpc_table_header = register_sysctl_table(sunrpc_table);
 }
 
 void
@@ -93,9 +87,8 @@ proc_dodebug(ctl_table *table, int write, struct file *file,
                        left--, s++;
                *(unsigned int *) table->data = value;
                /* Display the RPC tasks on writing to rpc_debug */
-               if (table->ctl_name == CTL_RPCDEBUG) {
+               if (strcmp(table->procname, "rpc_debug") == 0)
                        rpc_show_tasks();
-               }
        } else {
                if (!access_ok(VERIFY_WRITE, buffer, left))
                        return -EFAULT;
@@ -120,7 +113,6 @@ done:
 
 static ctl_table debug_table[] = {
        {
-               .ctl_name       = CTL_RPCDEBUG,
                .procname       = "rpc_debug",
                .data           = &rpc_debug,
                .maxlen         = sizeof(int),
@@ -128,7 +120,6 @@ static ctl_table debug_table[] = {
                .proc_handler   = &proc_dodebug
        },
        {
-               .ctl_name       = CTL_NFSDEBUG,
                .procname       = "nfs_debug",
                .data           = &nfs_debug,
                .maxlen         = sizeof(int),
@@ -136,7 +127,6 @@ static ctl_table debug_table[] = {
                .proc_handler   = &proc_dodebug
        },
        {
-               .ctl_name       = CTL_NFSDDEBUG,
                .procname       = "nfsd_debug",
                .data           = &nfsd_debug,
                .maxlen         = sizeof(int),
@@ -144,7 +134,6 @@ static ctl_table debug_table[] = {
                .proc_handler   = &proc_dodebug
        },
        {
-               .ctl_name       = CTL_NLMDEBUG,
                .procname       = "nlm_debug",
                .data           = &nlm_debug,
                .maxlen         = sizeof(int),