diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-03-17 22:05:47 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-03-17 22:05:47 +0000 |
commit | 27cfca1ec98e91261b1a5355d10a8996464b63af (patch) | |
tree | 8e895a53e372fa682b4c0a585b9377d67ed70d0e /net/sunrpc/sysctl.c | |
parent | 6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff) |
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too
o Upgrade to 2.1.89.
Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'net/sunrpc/sysctl.c')
-rw-r--r-- | net/sunrpc/sysctl.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c index 859d55853..a48e9c1ad 100644 --- a/net/sunrpc/sysctl.c +++ b/net/sunrpc/sysctl.c @@ -13,15 +13,11 @@ #include <linux/ctype.h> #include <linux/fs.h> #include <linux/sysctl.h> -#if LINUX_VERSION_CODE >= 0x020100 + #include <asm/uaccess.h> -#else -# include <linux/mm.h> -# define copy_from_user memcpy_fromfs -# define copy_to_user memcpy_tofs -# define access_ok !verify_area -#endif #include <linux/sunrpc/types.h> +#include <linux/sunrpc/sched.h> +#include <linux/sunrpc/stats.h> /* * Declare the debug flags here @@ -39,17 +35,23 @@ static ctl_table sunrpc_table[]; void rpc_register_sysctl(void) { - if (sunrpc_table_header) - return; - sunrpc_table_header = register_sysctl_table(sunrpc_table, 1); + if (!sunrpc_table_header) { + sunrpc_table_header = register_sysctl_table(sunrpc_table, 1); +#ifdef MODULE + if (sunrpc_table[0].de) + sunrpc_table[0].de->fill_inode = rpc_modcount; +#endif + } + } void rpc_unregister_sysctl(void) { - if (!sunrpc_table_header) - return; - unregister_sysctl_table(sunrpc_table_header); + if (sunrpc_table_header) { + unregister_sysctl_table(sunrpc_table_header); + sunrpc_table_header = NULL; + } } int @@ -93,6 +95,10 @@ proc_dodebug(ctl_table *table, int write, struct file *file, while (left && isspace(*p)) left--, p++; *(unsigned int *) table->data = value; + /* Display the RPC tasks on writing to rpc_debug */ + if (table->ctl_name == CTL_RPCDEBUG) { + rpc_show_tasks(); + } } else { if (!access_ok(VERIFY_WRITE, buffer, left)) return -EFAULT; |