summaryrefslogtreecommitdiff
path: root/fs/sysctls.c
blob: c701273c9432bcf7000c80ca7af2bf4ef92c5303 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// SPDX-License-Identifier: GPL-2.0
/*
 * /proc/sys/fs shared sysctls
 *
 * These sysctls are shared between different filesystems.
 */
#include <linux/init.h>
#include <linux/sysctl.h>

static struct ctl_table fs_shared_sysctls[] = {
	{
		.procname	= "overflowuid",
		.data		= &fs_overflowuid,
		.maxlen		= sizeof(int),
		.mode		= 0644,
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= SYSCTL_ZERO,
		.extra2		= SYSCTL_MAXOLDUID,
	},
	{
		.procname	= "overflowgid",
		.data		= &fs_overflowgid,
		.maxlen		= sizeof(int),
		.mode		= 0644,
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= SYSCTL_ZERO,
		.extra2		= SYSCTL_MAXOLDUID,
	},
	{ }
};

DECLARE_SYSCTL_BASE(fs, fs_shared_sysctls);

static int __init init_fs_sysctls(void)
{
	return register_sysctl_base(fs);
}

early_initcall(init_fs_sysctls);