diff options
author | Liu Shixin <liushixin2@huawei.com> | 2022-09-08 10:29:46 +0200 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2022-09-09 01:56:45 +0200 |
commit | b13bc7cbb931727b1b0a63594cd734bfd979e985 (patch) | |
tree | 6c8eef81d16d647f5b22053a939b23785830f591 /kernel/sysctl.c | |
parent | sysctl: remove max_extfrag_threshold (diff) | |
download | linux-b13bc7cbb931727b1b0a63594cd734bfd979e985.tar.xz linux-b13bc7cbb931727b1b0a63594cd734bfd979e985.zip |
kernel/sysctl.c: move sysctl_vals and sysctl_long_vals to sysctl.c
sysctl_vals and sysctl_long_vals are declared even if sysctl is disabled.
Move its definition to sysctl.c to make sure their integrity in any case.
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 368909f86469..82ab288758f5 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -82,9 +82,16 @@ #include <linux/rtmutex.h> #endif +/* shared constants to be used in various sysctls */ +const int sysctl_vals[] = { 0, 1, 2, 3, 4, 100, 200, 1000, 3000, INT_MAX, 65535, -1 }; +EXPORT_SYMBOL(sysctl_vals); + +const unsigned long sysctl_long_vals[] = { 0, 1, LONG_MAX }; +EXPORT_SYMBOL_GPL(sysctl_long_vals); + #if defined(CONFIG_SYSCTL) -/* Constants used for minimum and maximum */ +/* Constants used for minimum and maximum */ #ifdef CONFIG_PERF_EVENTS static const int six_hundred_forty_kb = 640 * 1024; |