]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - fs/coda/sysctl.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.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 14
87d1fda5 15#ifdef CONFIG_SYSCTL
1da177e4
LT
16static struct ctl_table_header *fs_table_header;
17
a88bbbee 18static struct ctl_table coda_table[] = {
fd6065b4 19 {
fd6065b4
EB
20 .procname = "timeout",
21 .data = &coda_timeout,
22 .maxlen = sizeof(int),
23 .mode = 0644,
6d456111 24 .proc_handler = proc_dointvec
fd6065b4
EB
25 },
26 {
fd6065b4
EB
27 .procname = "hard",
28 .data = &coda_hard,
29 .maxlen = sizeof(int),
30 .mode = 0644,
6d456111 31 .proc_handler = proc_dointvec
fd6065b4 32 },
fd6065b4 33 {
fd6065b4
EB
34 .procname = "fake_statfs",
35 .data = &coda_fake_statfs,
36 .maxlen = sizeof(int),
37 .mode = 0600,
6d456111 38 .proc_handler = proc_dointvec
fd6065b4
EB
39 },
40 {}
1da177e4
LT
41};
42
a88bbbee 43static struct ctl_table fs_table[] = {
fd6065b4 44 {
fd6065b4
EB
45 .procname = "coda",
46 .mode = 0555,
47 .child = coda_table
48 },
49 {}
1da177e4 50};
1da177e4 51
1da177e4
LT
52void coda_sysctl_init(void)
53{
1da177e4 54 if ( !fs_table_header )
0b4d4147 55 fs_table_header = register_sysctl_table(fs_table);
1da177e4
LT
56}
57
3cf01f28 58void coda_sysctl_clean(void)
1da177e4 59{
1da177e4
LT
60 if ( fs_table_header ) {
61 unregister_sysctl_table(fs_table_header);
62 fs_table_header = NULL;
63 }
1da177e4 64}
c03e3126
RM
65
66#else
67void coda_sysctl_init(void)
68{
69}
70
71void coda_sysctl_clean(void)
72{
73}
0bc825d2 74#endif