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
110110 /* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */
111111 static const unsigned long dirty_bytes_min = 2 * PAGE_SIZE;
112112
113−/* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
114−static const int maxolduid = 65535;
115−/* minolduid is SYSCTL_ZERO */
116−
117113 static const int ngroups_max = NGROUPS_MAX;
118114 static const int cap_last_cap = CAP_LAST_CAP;
119115
@@ -2127,7 +2123,7 @@ static struct ctl_table kern_table[] = { · 2007 unmodified lines
21272123 .mode = 0644,
21282124 .proc_handler = proc_dointvec_minmax,
21292125 .extra1 = SYSCTL_ZERO,
2130− .extra2 = (void *)&maxolduid,
2126+ .extra2 = SYSCTL_MAXOLDUID,
21312127 },
21322128 {
21332129 .procname = "overflowgid",
@@ -2136,7 +2132,7 @@ static struct ctl_table kern_table[] = { · 2 unmodified lines
21362132 .mode = 0644,
21372133 .proc_handler = proc_dointvec_minmax,
21382134 .extra1 = SYSCTL_ZERO,
2139− .extra2 = (void *)&maxolduid,
2135+ .extra2 = SYSCTL_MAXOLDUID,
21402136 },
21412137 #ifdef CONFIG_S390
21422138 {
@@ -2908,7 +2904,7 @@ static struct ctl_table fs_table[] = { · 765 unmodified lines
29082904 .mode = 0644,
29092905 .proc_handler = proc_dointvec_minmax,
29102906 .extra1 = SYSCTL_ZERO,
2911− .extra2 = (void *)&maxolduid,
2907+ .extra2 = SYSCTL_MAXOLDUID,
29122908 },
29132909 {
29142910 .procname = "overflowgid",
@@ -2917,7 +2913,7 @@ static struct ctl_table fs_table[] = { · 2 unmodified lines
29172913 .mode = 0644,
29182914 .proc_handler = proc_dointvec_minmax,
29192915 .extra1 = SYSCTL_ZERO,
2920− .extra2 = (void *)&maxolduid,
2916+ .extra2 = SYSCTL_MAXOLDUID,
29212917 },
29222918 #ifdef CONFIG_FILE_LOCKING
29232919 {