mmc: block: Add missing mmc_blk_put() in power_ro_lock_show()
[linux-2.6-block.git] / fs / coda / sysctl.c
CommitLineData
1da177e4
LT
1/*
2 * Sysctl operations for Coda filesystem
3 * Original version: (C) 1996 P. Braam and M. Callahan
4 * Rewritten for Linux 2.1. (C) 1997 Carnegie Mellon University
5 *
6 * Carnegie Mellon encourages users to contribute improvements to
7 * the Coda project. Contact Peter Braam (coda@cs.cmu.edu).
1da177e4
LT
8 */
9
1da177e4 10#include <linux/sysctl.h>
1da177e4 11
3cf01f28 12#include "coda_int.h"
1da177e4 13
87d1fda5 14#ifdef CONFIG_SYSCTL
1da177e4
LT
15static struct ctl_table_header *fs_table_header;
16
a88bbbee 17static struct ctl_table coda_table[] = {
fd6065b4 18 {
fd6065b4
EB
19 .procname = "timeout",
20 .data = &coda_timeout,
21 .maxlen = sizeof(int),
22 .mode = 0644,
6d456111 23 .proc_handler = proc_dointvec
fd6065b4
EB
24 },
25 {
fd6065b4
EB
26 .procname = "hard",
27 .data = &coda_hard,
28 .maxlen = sizeof(int),
29 .mode = 0644,
6d456111 30 .proc_handler = proc_dointvec
fd6065b4 31 },
fd6065b4 32 {
fd6065b4
EB
33 .procname = "fake_statfs",
34 .data = &coda_fake_statfs,
35 .maxlen = sizeof(int),
36 .mode = 0600,
6d456111 37 .proc_handler = proc_dointvec
fd6065b4
EB
38 },
39 {}
1da177e4
LT
40};
41
a88bbbee 42static struct ctl_table fs_table[] = {
fd6065b4 43 {
fd6065b4
EB
44 .procname = "coda",
45 .mode = 0555,
46 .child = coda_table
47 },
48 {}
1da177e4 49};
1da177e4 50
1da177e4
LT
51void coda_sysctl_init(void)
52{
1da177e4 53 if ( !fs_table_header )
0b4d4147 54 fs_table_header = register_sysctl_table(fs_table);
1da177e4
LT
55}
56
3cf01f28 57void coda_sysctl_clean(void)
1da177e4 58{
1da177e4
LT
59 if ( fs_table_header ) {
60 unregister_sysctl_table(fs_table_header);
61 fs_table_header = NULL;
62 }
1da177e4 63}
c03e3126
RM
64
65#else
66void coda_sysctl_init(void)
67{
68}
69
70void coda_sysctl_clean(void)
71{
72}
0bc825d2 73#endif