Blame view
fs/nfs/sysctl.c
1.26 KB
a72b44222 NFSv4: Allow user... |
1 2 3 4 5 |
/* * linux/fs/nfs/sysctl.c * * Sysctl interface to NFS parameters */ |
a72b44222 NFSv4: Allow user... |
6 7 8 9 10 11 |
#include <linux/types.h> #include <linux/linkage.h> #include <linux/ctype.h> #include <linux/fs.h> #include <linux/sysctl.h> #include <linux/module.h> |
51d8fa6a1 NFS: Add timeout ... |
12 |
#include <linux/nfs_fs.h> |
a72b44222 NFSv4: Allow user... |
13 |
|
a72b44222 NFSv4: Allow user... |
14 |
static struct ctl_table_header *nfs_callback_sysctl_table; |
a72b44222 NFSv4: Allow user... |
15 |
|
f5102e563 nfs: convert use ... |
16 |
static struct ctl_table nfs_cb_sysctls[] = { |
51d8fa6a1 NFS: Add timeout ... |
17 |
{ |
51d8fa6a1 NFS: Add timeout ... |
18 19 20 21 |
.procname = "nfs_mountpoint_timeout", .data = &nfs_mountpoint_expiry_timeout, .maxlen = sizeof(nfs_mountpoint_expiry_timeout), .mode = 0644, |
6d4561110 sysctl: Drop & in... |
22 |
.proc_handler = proc_dointvec_jiffies, |
51d8fa6a1 NFS: Add timeout ... |
23 |
}, |
89a09141d [PATCH] nfs: fix ... |
24 |
{ |
89a09141d [PATCH] nfs: fix ... |
25 26 27 28 |
.procname = "nfs_congestion_kb", .data = &nfs_congestion_kb, .maxlen = sizeof(nfs_congestion_kb), .mode = 0644, |
6d4561110 sysctl: Drop & in... |
29 |
.proc_handler = proc_dointvec, |
89a09141d [PATCH] nfs: fix ... |
30 |
}, |
ab09203e3 sysctl fs: Remove... |
31 |
{ } |
a72b44222 NFSv4: Allow user... |
32 |
}; |
f5102e563 nfs: convert use ... |
33 |
static struct ctl_table nfs_cb_sysctl_dir[] = { |
a72b44222 NFSv4: Allow user... |
34 |
{ |
a72b44222 NFSv4: Allow user... |
35 36 37 38 |
.procname = "nfs", .mode = 0555, .child = nfs_cb_sysctls, }, |
ab09203e3 sysctl fs: Remove... |
39 |
{ } |
a72b44222 NFSv4: Allow user... |
40 |
}; |
f5102e563 nfs: convert use ... |
41 |
static struct ctl_table nfs_cb_sysctl_root[] = { |
a72b44222 NFSv4: Allow user... |
42 |
{ |
a72b44222 NFSv4: Allow user... |
43 44 45 46 |
.procname = "fs", .mode = 0555, .child = nfs_cb_sysctl_dir, }, |
ab09203e3 sysctl fs: Remove... |
47 |
{ } |
a72b44222 NFSv4: Allow user... |
48 49 50 51 |
}; int nfs_register_sysctl(void) { |
0b4d41471 [PATCH] sysctl: r... |
52 |
nfs_callback_sysctl_table = register_sysctl_table(nfs_cb_sysctl_root); |
a72b44222 NFSv4: Allow user... |
53 54 55 56 57 58 59 60 61 62 |
if (nfs_callback_sysctl_table == NULL) return -ENOMEM; return 0; } void nfs_unregister_sysctl(void) { unregister_sysctl_table(nfs_callback_sysctl_table); nfs_callback_sysctl_table = NULL; } |