backlight: add new lm3639 backlight driver
[linux-2.6/btrfs-unstable.git] / fs / nfs / nfs4sysctl.c
blob5729bc8aa75dea9ef18f4211f6c31cb7061a44e7
1 /*
2 * linux/fs/nfs/nfs4sysctl.c
4 * Sysctl interface to NFS v4 parameters
6 * Copyright (c) 2006 Trond Myklebust <Trond.Myklebust@netapp.com>
7 */
8 #include <linux/sysctl.h>
9 #include <linux/nfs_idmap.h>
10 #include <linux/nfs_fs.h>
12 #include "callback.h"
14 static const int nfs_set_port_min = 0;
15 static const int nfs_set_port_max = 65535;
16 static struct ctl_table_header *nfs4_callback_sysctl_table;
18 static ctl_table nfs4_cb_sysctls[] = {
20 .procname = "nfs_callback_tcpport",
21 .data = &nfs_callback_set_tcpport,
22 .maxlen = sizeof(int),
23 .mode = 0644,
24 .proc_handler = proc_dointvec_minmax,
25 .extra1 = (int *)&nfs_set_port_min,
26 .extra2 = (int *)&nfs_set_port_max,
29 .procname = "idmap_cache_timeout",
30 .data = &nfs_idmap_cache_timeout,
31 .maxlen = sizeof(int),
32 .mode = 0644,
33 .proc_handler = proc_dointvec_jiffies,
35 { }
38 static ctl_table nfs4_cb_sysctl_dir[] = {
40 .procname = "nfs",
41 .mode = 0555,
42 .child = nfs4_cb_sysctls,
44 { }
47 static ctl_table nfs4_cb_sysctl_root[] = {
49 .procname = "fs",
50 .mode = 0555,
51 .child = nfs4_cb_sysctl_dir,
53 { }
56 int nfs4_register_sysctl(void)
58 nfs4_callback_sysctl_table = register_sysctl_table(nfs4_cb_sysctl_root);
59 if (nfs4_callback_sysctl_table == NULL)
60 return -ENOMEM;
61 return 0;
64 void nfs4_unregister_sysctl(void)
66 unregister_sysctl_table(nfs4_callback_sysctl_table);
67 nfs4_callback_sysctl_table = NULL;