History

sysctl: move maxolduid as a sysctl specific const

The maxolduid value is only shared for sysctl purposes for use on a max range. Just stuff this into our shared const array. [akpm@linux-foundation.org: fix sysctl_vals[], per Mickaël]

Luis Chamberlain committed 4 years ago

Commit 54771611 parent c8c0c233 files · +8 −9Browse files

Showing the changes to kernel (1 of 3 files). Show all

Unified · Split

kernel/sysctl.c+4−8
@@ -110,10 +110,6 @@ static const int six_hundred_forty_kb = 640 * 1024; · 109 unmodified lines
110/* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */110/* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */
111static const unsigned long dirty_bytes_min = 2 * PAGE_SIZE;111static const unsigned long dirty_bytes_min = 2 * PAGE_SIZE;
112 112
113/* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
114static const int maxolduid = 65535;
115/* minolduid is SYSCTL_ZERO */
116
117static const int ngroups_max = NGROUPS_MAX;113static const int ngroups_max = NGROUPS_MAX;
118static const int cap_last_cap = CAP_LAST_CAP;114static const int cap_last_cap = CAP_LAST_CAP;
119 115
@@ -2127,7 +2123,7 @@ static struct ctl_table kern_table[] = { · 2007 unmodified lines
2127 .mode = 0644,2123 .mode = 0644,
2128 .proc_handler = proc_dointvec_minmax,2124 .proc_handler = proc_dointvec_minmax,
2129 .extra1 = SYSCTL_ZERO,2125 .extra1 = SYSCTL_ZERO,
2130 .extra2 = (void *)&maxolduid,2126 .extra2 = SYSCTL_MAXOLDUID,
2131 },2127 },
2132 {2128 {
2133 .procname = "overflowgid",2129 .procname = "overflowgid",
@@ -2136,7 +2132,7 @@ static struct ctl_table kern_table[] = { · 2 unmodified lines
2136 .mode = 0644,2132 .mode = 0644,
2137 .proc_handler = proc_dointvec_minmax,2133 .proc_handler = proc_dointvec_minmax,
2138 .extra1 = SYSCTL_ZERO,2134 .extra1 = SYSCTL_ZERO,
2139 .extra2 = (void *)&maxolduid,2135 .extra2 = SYSCTL_MAXOLDUID,
2140 },2136 },
2141#ifdef CONFIG_S3902137#ifdef CONFIG_S390
2142 {2138 {
@@ -2908,7 +2904,7 @@ static struct ctl_table fs_table[] = { · 765 unmodified lines
2908 .mode = 0644,2904 .mode = 0644,
2909 .proc_handler = proc_dointvec_minmax,2905 .proc_handler = proc_dointvec_minmax,
2910 .extra1 = SYSCTL_ZERO,2906 .extra1 = SYSCTL_ZERO,
2911 .extra2 = (void *)&maxolduid,2907 .extra2 = SYSCTL_MAXOLDUID,
2912 },2908 },
2913 {2909 {
2914 .procname = "overflowgid",2910 .procname = "overflowgid",
@@ -2917,7 +2913,7 @@ static struct ctl_table fs_table[] = { · 2 unmodified lines
2917 .mode = 0644,2913 .mode = 0644,
2918 .proc_handler = proc_dointvec_minmax,2914 .proc_handler = proc_dointvec_minmax,
2919 .extra1 = SYSCTL_ZERO,2915 .extra1 = SYSCTL_ZERO,
2920 .extra2 = (void *)&maxolduid,2916 .extra2 = SYSCTL_MAXOLDUID,
2921 },2917 },
2922#ifdef CONFIG_FILE_LOCKING2918#ifdef CONFIG_FILE_LOCKING
2923 {2919 {