diff options
Diffstat (limited to 'fs/nfsd/nfsctl.c')
-rw-r--r-- | fs/nfsd/nfsctl.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 5bee0313dffd..7f555179bf81 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c | |||
@@ -35,6 +35,7 @@ enum { | |||
35 | NFSD_Threads, | 35 | NFSD_Threads, |
36 | NFSD_Pool_Threads, | 36 | NFSD_Pool_Threads, |
37 | NFSD_Pool_Stats, | 37 | NFSD_Pool_Stats, |
38 | NFSD_Reply_Cache_Stats, | ||
38 | NFSD_Versions, | 39 | NFSD_Versions, |
39 | NFSD_Ports, | 40 | NFSD_Ports, |
40 | NFSD_MaxBlkSize, | 41 | NFSD_MaxBlkSize, |
@@ -212,6 +213,13 @@ static const struct file_operations pool_stats_operations = { | |||
212 | .owner = THIS_MODULE, | 213 | .owner = THIS_MODULE, |
213 | }; | 214 | }; |
214 | 215 | ||
216 | static struct file_operations reply_cache_stats_operations = { | ||
217 | .open = nfsd_reply_cache_stats_open, | ||
218 | .read = seq_read, | ||
219 | .llseek = seq_lseek, | ||
220 | .release = single_release, | ||
221 | }; | ||
222 | |||
215 | /*----------------------------------------------------------------------------*/ | 223 | /*----------------------------------------------------------------------------*/ |
216 | /* | 224 | /* |
217 | * payload - write methods | 225 | * payload - write methods |
@@ -1047,6 +1055,7 @@ static int nfsd_fill_super(struct super_block * sb, void * data, int silent) | |||
1047 | [NFSD_Threads] = {"threads", &transaction_ops, S_IWUSR|S_IRUSR}, | 1055 | [NFSD_Threads] = {"threads", &transaction_ops, S_IWUSR|S_IRUSR}, |
1048 | [NFSD_Pool_Threads] = {"pool_threads", &transaction_ops, S_IWUSR|S_IRUSR}, | 1056 | [NFSD_Pool_Threads] = {"pool_threads", &transaction_ops, S_IWUSR|S_IRUSR}, |
1049 | [NFSD_Pool_Stats] = {"pool_stats", &pool_stats_operations, S_IRUGO}, | 1057 | [NFSD_Pool_Stats] = {"pool_stats", &pool_stats_operations, S_IRUGO}, |
1058 | [NFSD_Reply_Cache_Stats] = {"reply_cache_stats", &reply_cache_stats_operations, S_IRUGO}, | ||
1050 | [NFSD_Versions] = {"versions", &transaction_ops, S_IWUSR|S_IRUSR}, | 1059 | [NFSD_Versions] = {"versions", &transaction_ops, S_IWUSR|S_IRUSR}, |
1051 | [NFSD_Ports] = {"portlist", &transaction_ops, S_IWUSR|S_IRUGO}, | 1060 | [NFSD_Ports] = {"portlist", &transaction_ops, S_IWUSR|S_IRUGO}, |
1052 | [NFSD_MaxBlkSize] = {"max_block_size", &transaction_ops, S_IWUSR|S_IRUGO}, | 1061 | [NFSD_MaxBlkSize] = {"max_block_size", &transaction_ops, S_IWUSR|S_IRUGO}, |
@@ -1102,8 +1111,10 @@ static int create_proc_exports_entry(void) | |||
1102 | return -ENOMEM; | 1111 | return -ENOMEM; |
1103 | entry = proc_create("exports", 0, entry, | 1112 | entry = proc_create("exports", 0, entry, |
1104 | &exports_proc_operations); | 1113 | &exports_proc_operations); |
1105 | if (!entry) | 1114 | if (!entry) { |
1115 | remove_proc_entry("fs/nfs", NULL); | ||
1106 | return -ENOMEM; | 1116 | return -ENOMEM; |
1117 | } | ||
1107 | return 0; | 1118 | return 0; |
1108 | } | 1119 | } |
1109 | #else /* CONFIG_PROC_FS */ | 1120 | #else /* CONFIG_PROC_FS */ |