]> git.ipfire.org Git - people/ms/linux.git/blame - fs/coda/sysctl.c
Merge tag 'soc-fixes-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[people/ms/linux.git] / fs / coda / sysctl.c
CommitLineData
b2441318 1// SPDX-License-Identifier: GPL-2.0
1da177e4
LT
2/*
3 * Sysctl operations for Coda filesystem
4 * Original version: (C) 1996 P. Braam and M. Callahan
5 * Rewritten for Linux 2.1. (C) 1997 Carnegie Mellon University
6 *
7 * Carnegie Mellon encourages users to contribute improvements to
8 * the Coda project. Contact Peter Braam (coda@cs.cmu.edu).
1da177e4
LT
9 */
10
1da177e4 11#include <linux/sysctl.h>
1da177e4 12
3cf01f28 13#include "coda_int.h"
1da177e4
LT
14
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}