diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2009-09-23 18:57:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-24 10:21:04 -0400 |
commit | 8d65af789f3e2cf4cfbdbf71a0f7a61ebcd41d38 (patch) | |
tree | 121df3bfffc7853ac6d2c514ad514d4a748a0933 | |
parent | c0d0787b6d47d9f4d5e8bd321921104e854a9135 (diff) |
sysctl: remove "struct file *" argument of ->proc_handler
It's unused.
It isn't needed -- read or write flag is already passed and sysctl
shouldn't care about the rest.
It _was_ used in two places at arch/frv for some reason.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
60 files changed, 239 insertions, 270 deletions
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c index be722fc1acf..0d4d3e3a4cf 100644 --- a/arch/frv/kernel/pm.c +++ b/arch/frv/kernel/pm.c | |||
@@ -150,7 +150,7 @@ static int user_atoi(char __user *ubuf, size_t len) | |||
150 | /* | 150 | /* |
151 | * Send us to sleep. | 151 | * Send us to sleep. |
152 | */ | 152 | */ |
153 | static int sysctl_pm_do_suspend(ctl_table *ctl, int write, struct file *filp, | 153 | static int sysctl_pm_do_suspend(ctl_table *ctl, int write, |
154 | void __user *buffer, size_t *lenp, loff_t *fpos) | 154 | void __user *buffer, size_t *lenp, loff_t *fpos) |
155 | { | 155 | { |
156 | int retval, mode; | 156 | int retval, mode; |
@@ -198,13 +198,13 @@ static int try_set_cmode(int new_cmode) | |||
198 | } | 198 | } |
199 | 199 | ||
200 | 200 | ||
201 | static int cmode_procctl(ctl_table *ctl, int write, struct file *filp, | 201 | static int cmode_procctl(ctl_table *ctl, int write, |
202 | void __user *buffer, size_t *lenp, loff_t *fpos) | 202 | void __user *buffer, size_t *lenp, loff_t *fpos) |
203 | { | 203 | { |
204 | int new_cmode; | 204 | int new_cmode; |
205 | 205 | ||
206 | if (!write) | 206 | if (!write) |
207 | return proc_dointvec(ctl, write, filp, buffer, lenp, fpos); | 207 | return proc_dointvec(ctl, write, buffer, lenp, fpos); |
208 | 208 | ||
209 | new_cmode = user_atoi(buffer, *lenp); | 209 | new_cmode = user_atoi(buffer, *lenp); |
210 | 210 | ||
@@ -301,13 +301,13 @@ static int try_set_cm(int new_cm) | |||
301 | return 0; | 301 | return 0; |
302 | } | 302 | } |
303 | 303 | ||
304 | static int p0_procctl(ctl_table *ctl, int write, struct file *filp, | 304 | static int p0_procctl(ctl_table *ctl, int write, |
305 | void __user *buffer, size_t *lenp, loff_t *fpos) | 305 | void __user *buffer, size_t *lenp, loff_t *fpos) |
306 | { | 306 | { |
307 | int new_p0; | 307 | int new_p0; |
308 | 308 | ||
309 | if (!write) | 309 | if (!write) |
310 | return proc_dointvec(ctl, write, filp, buffer, lenp, fpos); | 310 | return proc_dointvec(ctl, write, buffer, lenp, fpos); |
311 | 311 | ||
312 | new_p0 = user_atoi(buffer, *lenp); | 312 | new_p0 = user_atoi(buffer, *lenp); |
313 | 313 | ||
@@ -345,13 +345,13 @@ static int p0_sysctl(ctl_table *table, | |||
345 | return 1; | 345 | return 1; |
346 | } | 346 | } |
347 | 347 | ||
348 | static int cm_procctl(ctl_table *ctl, int write, struct file *filp, | 348 | static int cm_procctl(ctl_table *ctl, int write, |
349 | void __user *buffer, size_t *lenp, loff_t *fpos) | 349 | void __user *buffer, size_t *lenp, loff_t *fpos) |
350 | { | 350 | { |
351 | int new_cm; | 351 | int new_cm; |
352 | 352 | ||
353 | if (!write) | 353 | if (!write) |
354 | return proc_dointvec(ctl, write, filp, buffer, lenp, fpos); | 354 | return proc_dointvec(ctl, write, buffer, lenp, fpos); |
355 | 355 | ||
356 | new_cm = user_atoi(buffer, *lenp); | 356 | new_cm = user_atoi(buffer, *lenp); |
357 | 357 | ||
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c index 3f04d4c406b..b3deed8db61 100644 --- a/arch/mips/lasat/sysctl.c +++ b/arch/mips/lasat/sysctl.c | |||
@@ -56,12 +56,12 @@ int sysctl_lasatstring(ctl_table *table, | |||
56 | 56 | ||
57 | 57 | ||
58 | /* And the same for proc */ | 58 | /* And the same for proc */ |
59 | int proc_dolasatstring(ctl_table *table, int write, struct file *filp, | 59 | int proc_dolasatstring(ctl_table *table, int write, |
60 | void *buffer, size_t *lenp, loff_t *ppos) | 60 | void *buffer, size_t *lenp, loff_t *ppos) |
61 | { | 61 | { |
62 | int r; | 62 | int r; |
63 | 63 | ||
64 | r = proc_dostring(table, write, filp, buffer, lenp, ppos); | 64 | r = proc_dostring(table, write, buffer, lenp, ppos); |
65 | if ((!write) || r) | 65 | if ((!write) || r) |
66 | return r; | 66 | return r; |
67 | 67 | ||
@@ -71,12 +71,12 @@ int proc_dolasatstring(ctl_table *table, int write, struct file *filp, | |||
71 | } | 71 | } |
72 | 72 | ||
73 | /* proc function to write EEPROM after changing int entry */ | 73 | /* proc function to write EEPROM after changing int entry */ |
74 | int proc_dolasatint(ctl_table *table, int write, struct file *filp, | 74 | int proc_dolasatint(ctl_table *table, int write, |
75 | void *buffer, size_t *lenp, loff_t *ppos) | 75 | void *buffer, size_t *lenp, loff_t *ppos) |
76 | { | 76 | { |
77 | int r; | 77 | int r; |
78 | 78 | ||
79 | r = proc_dointvec(table, write, filp, buffer, lenp, ppos); | 79 | r = proc_dointvec(table, write, buffer, lenp, ppos); |
80 | if ((!write) || r) | 80 | if ((!write) || r) |
81 | return r; | 81 | return r; |
82 | 82 | ||
@@ -89,7 +89,7 @@ int proc_dolasatint(ctl_table *table, int write, struct file *filp, | |||
89 | static int rtctmp; | 89 | static int rtctmp; |
90 | 90 | ||
91 | /* proc function to read/write RealTime Clock */ | 91 | /* proc function to read/write RealTime Clock */ |
92 | int proc_dolasatrtc(ctl_table *table, int write, struct file *filp, | 92 | int proc_dolasatrtc(ctl_table *table, int write, |
93 | void *buffer, size_t *lenp, loff_t *ppos) | 93 | void *buffer, size_t *lenp, loff_t *ppos) |
94 | { | 94 | { |
95 | struct timespec ts; | 95 | struct timespec ts; |
@@ -102,7 +102,7 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp, | |||
102 | if (rtctmp < 0) | 102 | if (rtctmp < 0) |
103 | rtctmp = 0; | 103 | rtctmp = 0; |
104 | } | 104 | } |
105 | r = proc_dointvec(table, write, filp, buffer, lenp, ppos); | 105 | r = proc_dointvec(table, write, buffer, lenp, ppos); |
106 | if (r) | 106 | if (r) |
107 | return r; | 107 | return r; |
108 | 108 | ||
@@ -154,7 +154,7 @@ int sysctl_lasat_rtc(ctl_table *table, | |||
154 | #endif | 154 | #endif |
155 | 155 | ||
156 | #ifdef CONFIG_INET | 156 | #ifdef CONFIG_INET |
157 | int proc_lasat_ip(ctl_table *table, int write, struct file *filp, | 157 | int proc_lasat_ip(ctl_table *table, int write, |
158 | void *buffer, size_t *lenp, loff_t *ppos) | 158 | void *buffer, size_t *lenp, loff_t *ppos) |
159 | { | 159 | { |
160 | unsigned int ip; | 160 | unsigned int ip; |
@@ -231,12 +231,12 @@ static int sysctl_lasat_prid(ctl_table *table, | |||
231 | return 0; | 231 | return 0; |
232 | } | 232 | } |
233 | 233 | ||
234 | int proc_lasat_prid(ctl_table *table, int write, struct file *filp, | 234 | int proc_lasat_prid(ctl_table *table, int write, |
235 | void *buffer, size_t *lenp, loff_t *ppos) | 235 | void *buffer, size_t *lenp, loff_t *ppos) |
236 | { | 236 | { |
237 | int r; | 237 | int r; |
238 | 238 | ||
239 | r = proc_dointvec(table, write, filp, buffer, lenp, ppos); | 239 | r = proc_dointvec(table, write, buffer, lenp, ppos); |
240 | if (r < 0) | 240 | if (r < 0) |
241 | return r; | 241 | return r; |
242 | if (write) { | 242 | if (write) { |
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index 264528e4f58..b55fd7ed1c3 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
@@ -50,10 +50,9 @@ static struct platform_device *appldata_pdev; | |||
50 | * /proc entries (sysctl) | 50 | * /proc entries (sysctl) |
51 | */ | 51 | */ |
52 | static const char appldata_proc_name[APPLDATA_PROC_NAME_LENGTH] = "appldata"; | 52 | static const char appldata_proc_name[APPLDATA_PROC_NAME_LENGTH] = "appldata"; |
53 | static int appldata_timer_handler(ctl_table *ctl, int write, struct file *filp, | 53 | static int appldata_timer_handler(ctl_table *ctl, int write, |
54 | void __user *buffer, size_t *lenp, loff_t *ppos); | 54 | void __user *buffer, size_t *lenp, loff_t *ppos); |
55 | static int appldata_interval_handler(ctl_table *ctl, int write, | 55 | static int appldata_interval_handler(ctl_table *ctl, int write, |
56 | struct file *filp, | ||
57 | void __user *buffer, | 56 | void __user *buffer, |
58 | size_t *lenp, loff_t *ppos); | 57 | size_t *lenp, loff_t *ppos); |
59 | 58 | ||
@@ -247,7 +246,7 @@ __appldata_vtimer_setup(int cmd) | |||
247 | * Start/Stop timer, show status of timer (0 = not active, 1 = active) | 246 | * Start/Stop timer, show status of timer (0 = not active, 1 = active) |
248 | */ | 247 | */ |
249 | static int | 248 | static int |
250 | appldata_timer_handler(ctl_table *ctl, int write, struct file *filp, | 249 | appldata_timer_handler(ctl_table *ctl, int write, |
251 | void __user *buffer, size_t *lenp, loff_t *ppos) | 250 | void __user *buffer, size_t *lenp, loff_t *ppos) |
252 | { | 251 | { |
253 | int len; | 252 | int len; |
@@ -289,7 +288,7 @@ out: | |||
289 | * current timer interval. | 288 | * current timer interval. |
290 | */ | 289 | */ |
291 | static int | 290 | static int |
292 | appldata_interval_handler(ctl_table *ctl, int write, struct file *filp, | 291 | appldata_interval_handler(ctl_table *ctl, int write, |
293 | void __user *buffer, size_t *lenp, loff_t *ppos) | 292 | void __user *buffer, size_t *lenp, loff_t *ppos) |
294 | { | 293 | { |
295 | int len, interval; | 294 | int len, interval; |
@@ -335,7 +334,7 @@ out: | |||
335 | * monitoring (0 = not in process, 1 = in process) | 334 | * monitoring (0 = not in process, 1 = in process) |
336 | */ | 335 | */ |
337 | static int | 336 | static int |
338 | appldata_generic_handler(ctl_table *ctl, int write, struct file *filp, | 337 | appldata_generic_handler(ctl_table *ctl, int write, |
339 | void __user *buffer, size_t *lenp, loff_t *ppos) | 338 | void __user *buffer, size_t *lenp, loff_t *ppos) |
340 | { | 339 | { |
341 | struct appldata_ops *ops = NULL, *tmp_ops; | 340 | struct appldata_ops *ops = NULL, *tmp_ops; |
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 4c512561687..20f282c911c 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
@@ -881,11 +881,11 @@ static int debug_active=1; | |||
881 | * if debug_active is already off | 881 | * if debug_active is already off |
882 | */ | 882 | */ |
883 | static int | 883 | static int |
884 | s390dbf_procactive(ctl_table *table, int write, struct file *filp, | 884 | s390dbf_procactive(ctl_table *table, int write, |
885 | void __user *buffer, size_t *lenp, loff_t *ppos) | 885 | void __user *buffer, size_t *lenp, loff_t *ppos) |
886 | { | 886 | { |
887 | if (!write || debug_stoppable || !debug_active) | 887 | if (!write || debug_stoppable || !debug_active) |
888 | return proc_dointvec(table, write, filp, buffer, lenp, ppos); | 888 | return proc_dointvec(table, write, buffer, lenp, ppos); |
889 | else | 889 | else |
890 | return 0; | 890 | return 0; |
891 | } | 891 | } |
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index 413c240cbca..b201135cc18 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c | |||
@@ -262,7 +262,7 @@ cmm_skip_blanks(char *cp, char **endp) | |||
262 | static struct ctl_table cmm_table[]; | 262 | static struct ctl_table cmm_table[]; |
263 | 263 | ||
264 | static int | 264 | static int |
265 | cmm_pages_handler(ctl_table *ctl, int write, struct file *filp, | 265 | cmm_pages_handler(ctl_table *ctl, int write, |
266 | void __user *buffer, size_t *lenp, loff_t *ppos) | 266 | void __user *buffer, size_t *lenp, loff_t *ppos) |
267 | { | 267 | { |
268 | char buf[16], *p; | 268 | char buf[16], *p; |
@@ -303,7 +303,7 @@ cmm_pages_handler(ctl_table *ctl, int write, struct file *filp, | |||
303 | } | 303 | } |
304 | 304 | ||
305 | static int | 305 | static int |
306 | cmm_timeout_handler(ctl_table *ctl, int write, struct file *filp, | 306 | cmm_timeout_handler(ctl_table *ctl, int write, |
307 | void __user *buffer, size_t *lenp, loff_t *ppos) | 307 | void __user *buffer, size_t *lenp, loff_t *ppos) |
308 | { | 308 | { |
309 | char buf[64], *p; | 309 | char buf[64], *p; |
diff --git a/arch/x86/include/asm/nmi.h b/arch/x86/include/asm/nmi.h index e63cf7d441e..139d4c1a33a 100644 --- a/arch/x86/include/asm/nmi.h +++ b/arch/x86/include/asm/nmi.h | |||
@@ -40,8 +40,7 @@ extern unsigned int nmi_watchdog; | |||
40 | #define NMI_INVALID 3 | 40 | #define NMI_INVALID 3 |
41 | 41 | ||
42 | struct ctl_table; | 42 | struct ctl_table; |
43 | struct file; | 43 | extern int proc_nmi_enabled(struct ctl_table *, int , |
44 | extern int proc_nmi_enabled(struct ctl_table *, int , struct file *, | ||
45 | void __user *, size_t *, loff_t *); | 44 | void __user *, size_t *, loff_t *); |
46 | extern int unknown_nmi_panic; | 45 | extern int unknown_nmi_panic; |
47 | 46 | ||
diff --git a/arch/x86/kernel/apic/nmi.c b/arch/x86/kernel/apic/nmi.c index cb66a22d98a..7ff61d6a188 100644 --- a/arch/x86/kernel/apic/nmi.c +++ b/arch/x86/kernel/apic/nmi.c | |||
@@ -508,14 +508,14 @@ static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu) | |||
508 | /* | 508 | /* |
509 | * proc handler for /proc/sys/kernel/nmi | 509 | * proc handler for /proc/sys/kernel/nmi |
510 | */ | 510 | */ |
511 | int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file, | 511 | int proc_nmi_enabled(struct ctl_table *table, int write, |
512 | void __user *buffer, size_t *length, loff_t *ppos) | 512 | void __user *buffer, size_t *length, loff_t *ppos) |
513 | { | 513 | { |
514 | int old_state; | 514 | int old_state; |
515 | 515 | ||
516 | nmi_watchdog_enabled = (atomic_read(&nmi_active) > 0) ? 1 : 0; | 516 | nmi_watchdog_enabled = (atomic_read(&nmi_active) > 0) ? 1 : 0; |
517 | old_state = nmi_watchdog_enabled; | 517 | old_state = nmi_watchdog_enabled; |
518 | proc_dointvec(table, write, file, buffer, length, ppos); | 518 | proc_dointvec(table, write, buffer, length, ppos); |
519 | if (!!old_state == !!nmi_watchdog_enabled) | 519 | if (!!old_state == !!nmi_watchdog_enabled) |
520 | return 0; | 520 | return 0; |
521 | 521 | ||
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c index cf53a78e2dc..8cb4974ff59 100644 --- a/arch/x86/kernel/vsyscall_64.c +++ b/arch/x86/kernel/vsyscall_64.c | |||
@@ -228,19 +228,11 @@ static long __vsyscall(3) venosys_1(void) | |||
228 | } | 228 | } |
229 | 229 | ||
230 | #ifdef CONFIG_SYSCTL | 230 | #ifdef CONFIG_SYSCTL |
231 | |||
232 | static int | ||
233 | vsyscall_sysctl_change(ctl_table *ctl, int write, struct file * filp, | ||
234 | void __user *buffer, size_t *lenp, loff_t *ppos) | ||
235 | { | ||
236 | return proc_dointvec(ctl, write, filp, buffer, lenp, ppos); | ||
237 | } | ||
238 | |||
239 | static ctl_table kernel_table2[] = { | 231 | static ctl_table kernel_table2[] = { |
240 | { .procname = "vsyscall64", | 232 | { .procname = "vsyscall64", |
241 | .data = &vsyscall_gtod_data.sysctl_enabled, .maxlen = sizeof(int), | 233 | .data = &vsyscall_gtod_data.sysctl_enabled, .maxlen = sizeof(int), |
242 | .mode = 0644, | 234 | .mode = 0644, |
243 | .proc_handler = vsyscall_sysctl_change }, | 235 | .proc_handler = proc_dointvec }, |
244 | {} | 236 | {} |
245 | }; | 237 | }; |
246 | 238 | ||
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 71d1b9bab70..614da5b8613 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c | |||
@@ -3412,7 +3412,7 @@ static int cdrom_print_info(const char *header, int val, char *info, | |||
3412 | return 0; | 3412 | return 0; |
3413 | } | 3413 | } |
3414 | 3414 | ||
3415 | static int cdrom_sysctl_info(ctl_table *ctl, int write, struct file * filp, | 3415 | static int cdrom_sysctl_info(ctl_table *ctl, int write, |
3416 | void __user *buffer, size_t *lenp, loff_t *ppos) | 3416 | void __user *buffer, size_t *lenp, loff_t *ppos) |
3417 | { | 3417 | { |
3418 | int pos; | 3418 | int pos; |
@@ -3489,7 +3489,7 @@ static int cdrom_sysctl_info(ctl_table *ctl, int write, struct file * filp, | |||
3489 | goto done; | 3489 | goto done; |
3490 | doit: | 3490 | doit: |
3491 | mutex_unlock(&cdrom_mutex); | 3491 | mutex_unlock(&cdrom_mutex); |
3492 | return proc_dostring(ctl, write, filp, buffer, lenp, ppos); | 3492 | return proc_dostring(ctl, write, buffer, lenp, ppos); |
3493 | done: | 3493 | done: |
3494 | printk(KERN_INFO "cdrom: info buffer too small\n"); | 3494 | printk(KERN_INFO "cdrom: info buffer too small\n"); |
3495 | goto doit; | 3495 | goto doit; |
@@ -3525,12 +3525,12 @@ static void cdrom_update_settings(void) | |||
3525 | mutex_unlock(&cdrom_mutex); | 3525 | mutex_unlock(&cdrom_mutex); |
3526 | } | 3526 | } |
3527 | 3527 | ||
3528 | static int cdrom_sysctl_handler(ctl_table *ctl, int write, struct file * filp, | 3528 | static int cdrom_sysctl_handler(ctl_table *ctl, int write, |
3529 | void __user *buffer, size_t *lenp, loff_t *ppos) | 3529 | void __user *buffer, size_t *lenp, loff_t *ppos) |
3530 | { | 3530 | { |
3531 | int ret; | 3531 | int ret; |
3532 | 3532 | ||
3533 | ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); | 3533 | ret = proc_dointvec(ctl, write, buffer, lenp, ppos); |
3534 | 3534 | ||
3535 | if (write) { | 3535 | if (write) { |
3536 | 3536 | ||
diff --git a/drivers/char/random.c b/drivers/char/random.c index d8a9255e1a3..04b505e5a5e 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c | |||
@@ -1231,7 +1231,7 @@ static char sysctl_bootid[16]; | |||
1231 | * as an ASCII string in the standard UUID format. If accesses via the | 1231 | * as an ASCII string in the standard UUID format. If accesses via the |
1232 | * sysctl system call, it is returned as 16 bytes of binary data. | 1232 | * sysctl system call, it is returned as 16 bytes of binary data. |
1233 | */ | 1233 | */ |
1234 | static int proc_do_uuid(ctl_table *table, int write, struct file *filp, | 1234 | static int proc_do_uuid(ctl_table *table, int write, |
1235 | void __user *buffer, size_t *lenp, loff_t *ppos) | 1235 | void __user *buffer, size_t *lenp, loff_t *ppos) |
1236 | { | 1236 | { |
1237 | ctl_table fake_table; | 1237 | ctl_table fake_table; |
@@ -1254,7 +1254,7 @@ static int proc_do_uuid(ctl_table *table, int write, struct file *filp, | |||
1254 | fake_table.data = buf; | 1254 | fake_table.data = buf; |
1255 | fake_table.maxlen = sizeof(buf); | 1255 | fake_table.maxlen = sizeof(buf); |
1256 | 1256 | ||
1257 | return proc_dostring(&fake_table, write, filp, buffer, lenp, ppos); | 1257 | return proc_dostring(&fake_table, write, buffer, lenp, ppos); |
1258 | } | 1258 | } |
1259 | 1259 | ||
1260 | static int uuid_strategy(ctl_table *table, | 1260 | static int uuid_strategy(ctl_table *table, |
diff --git a/drivers/net/wireless/arlan-proc.c b/drivers/net/wireless/arlan-proc.c index 2ab1d59870f..a8b689635a3 100644 --- a/drivers/net/wireless/arlan-proc.c +++ b/drivers/net/wireless/arlan-proc.c | |||
@@ -402,7 +402,7 @@ static int arlan_setup_card_by_book(struct net_device *dev) | |||
402 | 402 | ||
403 | static char arlan_drive_info[ARLAN_STR_SIZE] = "A655\n\0"; | 403 | static char arlan_drive_info[ARLAN_STR_SIZE] = "A655\n\0"; |
404 | 404 | ||
405 | static int arlan_sysctl_info(ctl_table * ctl, int write, struct file *filp, | 405 | static int arlan_sysctl_info(ctl_table * ctl, int write, |
406 | void __user *buffer, size_t * lenp, loff_t *ppos) | 406 | void __user *buffer, size_t * lenp, loff_t *ppos) |
407 | { | 407 | { |
408 | int i; | 408 | int i; |
@@ -629,7 +629,7 @@ final: | |||
629 | *lenp = pos; | 629 | *lenp = pos; |
630 | 630 | ||
631 | if (!write) | 631 | if (!write) |
632 | retv = proc_dostring(ctl, write, filp, buffer, lenp, ppos); | 632 | retv = proc_dostring(ctl, write, buffer, lenp, ppos); |
633 | else | 633 | else |
634 | { | 634 | { |
635 | *lenp = 0; | 635 | *lenp = 0; |
@@ -639,7 +639,7 @@ final: | |||
639 | } | 639 | } |
640 | 640 | ||
641 | 641 | ||
642 | static int arlan_sysctl_info161719(ctl_table * ctl, int write, struct file *filp, | 642 | static int arlan_sysctl_info161719(ctl_table * ctl, int write, |
643 | void __user *buffer, size_t * lenp, loff_t *ppos) | 643 | void __user *buffer, size_t * lenp, loff_t *ppos) |
644 | { | 644 | { |
645 | int i; | 645 | int i; |
@@ -669,11 +669,11 @@ static int arlan_sysctl_info161719(ctl_table * ctl, int write, struct file *filp | |||
669 | 669 | ||
670 | final: | 670 | final: |
671 | *lenp = pos; | 671 | *lenp = pos; |
672 | retv = proc_dostring(ctl, write, filp, buffer, lenp, ppos); | 672 | retv = proc_dostring(ctl, write, buffer, lenp, ppos); |
673 | return retv; | 673 | return retv; |
674 | } | 674 | } |
675 | 675 | ||
676 | static int arlan_sysctl_infotxRing(ctl_table * ctl, int write, struct file *filp, | 676 | static int arlan_sysctl_infotxRing(ctl_table * ctl, int write, |
677 | void __user *buffer, size_t * lenp, loff_t *ppos) | 677 | void __user *buffer, size_t * lenp, loff_t *ppos) |
678 | { | 678 | { |
679 | int i; | 679 | int i; |
@@ -698,11 +698,11 @@ static int arlan_sysctl_infotxRing(ctl_table * ctl, int write, struct file *filp | |||
698 | SARLBNpln(u_char, txBuffer, 0x800); | 698 | SARLBNpln(u_char, txBuffer, 0x800); |
699 | final: | 699 | final: |
700 | *lenp = pos; | 700 | *lenp = pos; |
701 | retv = proc_dostring(ctl, write, filp, buffer, lenp, ppos); | 701 | retv = proc_dostring(ctl, write, buffer, lenp, ppos); |
702 | return retv; | 702 | return retv; |
703 | } | 703 | } |
704 | 704 | ||
705 | static int arlan_sysctl_inforxRing(ctl_table * ctl, int write, struct file *filp, | 705 | static int arlan_sysctl_inforxRing(ctl_table * ctl, int write, |
706 | void __user *buffer, size_t * lenp, loff_t *ppos) | 706 | void __user *buffer, size_t * lenp, loff_t *ppos) |
707 | { | 707 | { |
708 | int i; | 708 | int i; |
@@ -726,11 +726,11 @@ static int arlan_sysctl_inforxRing(ctl_table * ctl, int write, struct file *filp | |||
726 | SARLBNpln(u_char, rxBuffer, 0x800); | 726 | SARLBNpln(u_char, rxBuffer, 0x800); |
727 | final: | 727 | final: |
728 | *lenp = pos; | 728 | *lenp = pos; |
729 | retv = proc_dostring(ctl, write, filp, buffer, lenp, ppos); | 729 | retv = proc_dostring(ctl, write, buffer, lenp, ppos); |
730 | return retv; | 730 | return retv; |
731 | } | 731 | } |
732 | 732 | ||
733 | static int arlan_sysctl_info18(ctl_table * ctl, int write, struct file *filp, | 733 | static int arlan_sysctl_info18(ctl_table * ctl, int write, |
734 | void __user *buffer, size_t * lenp, loff_t *ppos) | 734 | void __user *buffer, size_t * lenp, loff_t *ppos) |
735 | { | 735 | { |
736 | int i; | 736 | int i; |
@@ -756,7 +756,7 @@ static int arlan_sysctl_info18(ctl_table * ctl, int write, struct file *filp, | |||
756 | 756 | ||
757 | final: | 757 | final: |
758 | *lenp = pos; | 758 | *lenp = pos; |
759 | retv = proc_dostring(ctl, write, filp, buffer, lenp, ppos); | 759 | retv = proc_dostring(ctl, write, buffer, lenp, ppos); |
760 | return retv; | 760 | return retv; |
761 | } | 761 | } |
762 | 762 | ||
@@ -766,7 +766,7 @@ final: | |||
766 | 766 | ||
767 | static char conf_reset_result[200]; | 767 | static char conf_reset_result[200]; |
768 | 768 | ||
769 | static int arlan_configure(ctl_table * ctl, int write, struct file *filp, | 769 | static int arlan_configure(ctl_table * ctl, int write, |
770 | void __user *buffer, size_t * lenp, loff_t *ppos) | 770 | void __user *buffer, size_t * lenp, loff_t *ppos) |
771 | { | 771 | { |
772 | int pos = 0; | 772 | int pos = 0; |
@@ -788,10 +788,10 @@ static int arlan_configure(ctl_table * ctl, int write, struct file *filp, | |||
788 | return -1; | 788 | return -1; |
789 | 789 | ||
790 | *lenp = pos; | 790 | *lenp = pos; |
791 | return proc_dostring(ctl, write, filp, buffer, lenp, ppos); | 791 | return proc_dostring(ctl, write, buffer, lenp, ppos); |
792 | } | 792 | } |
793 | 793 | ||
794 | static int arlan_sysctl_reset(ctl_table * ctl, int write, struct file *filp, | 794 | static int arlan_sysctl_reset(ctl_table * ctl, int write, |
795 | void __user *buffer, size_t * lenp, loff_t *ppos) | 795 | void __user *buffer, size_t * lenp, loff_t *ppos) |
796 | { | 796 | { |
797 | int pos = 0; | 797 | int pos = 0; |
@@ -811,7 +811,7 @@ static int arlan_sysctl_reset(ctl_table * ctl, int write, struct file *filp, | |||
811 | } else | 811 | } else |
812 | return -1; | 812 | return -1; |
813 | *lenp = pos + 3; | 813 | *lenp = pos + 3; |
814 | return proc_dostring(ctl, write, filp, buffer, lenp, ppos); | 814 | return proc_dostring(ctl, write, buffer, lenp, ppos); |
815 | } | 815 | } |
816 | 816 | ||
817 | 817 | ||
diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c index 554e11f9e1c..8eefe56f1cb 100644 --- a/drivers/parport/procfs.c +++ b/drivers/parport/procfs.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #define PARPORT_MIN_SPINTIME_VALUE 1 | 31 | #define PARPORT_MIN_SPINTIME_VALUE 1 |
32 | #define PARPORT_MAX_SPINTIME_VALUE 1000 | 32 | #define PARPORT_MAX_SPINTIME_VALUE 1000 |
33 | 33 | ||
34 | static int do_active_device(ctl_table *table, int write, struct file *filp, | 34 | static int do_active_device(ctl_table *table, int write, |
35 | void __user *result, size_t *lenp, loff_t *ppos) | 35 | void __user *result, size_t *lenp, loff_t *ppos) |
36 | { | 36 | { |
37 | struct parport *port = (struct parport *)table->extra1; | 37 | struct parport *port = (struct parport *)table->extra1; |
@@ -68,7 +68,7 @@ static int do_active_device(ctl_table *table, int write, struct file *filp, | |||
68 | } | 68 | } |
69 | 69 | ||
70 | #ifdef CONFIG_PARPORT_1284 | 70 | #ifdef CONFIG_PARPORT_1284 |
71 | static int do_autoprobe(ctl_table *table, int write, struct file *filp, | 71 | static int do_autoprobe(ctl_table *table, int write, |
72 | void __user *result, size_t *lenp, loff_t *ppos) | 72 | void __user *result, size_t *lenp, loff_t *ppos) |
73 | { | 73 | { |
74 | struct parport_device_info *info = table->extra2; | 74 | struct parport_device_info *info = table->extra2; |
@@ -111,7 +111,7 @@ static int do_autoprobe(ctl_table *table, int write, struct file *filp, | |||
111 | #endif /* IEEE1284.3 support. */ | 111 | #endif /* IEEE1284.3 support. */ |
112 | 112 | ||
113 | static int do_hardware_base_addr (ctl_table *table, int write, | 113 | static int do_hardware_base_addr (ctl_table *table, int write, |
114 | struct file *filp, void __user *result, | 114 | void __user *result, |
115 | size_t *lenp, loff_t *ppos) | 115 | size_t *lenp, loff_t *ppos) |
116 | { | 116 | { |
117 | struct parport *port = (struct parport *)table->extra1; | 117 | struct parport *port = (struct parport *)table->extra1; |
@@ -139,7 +139,7 @@ static int do_hardware_base_addr (ctl_table *table, int write, | |||
139 | } | 139 | } |
140 | 140 | ||
141 | static int do_hardware_irq (ctl_table *table, int write, | 141 | static int do_hardware_irq (ctl_table *table, int write, |
142 | struct file *filp, void __user *result, | 142 | void __user *result, |
143 | size_t *lenp, loff_t *ppos) | 143 | size_t *lenp, loff_t *ppos) |
144 | { | 144 | { |
145 | struct parport *port = (struct parport *)table->extra1; | 145 | struct parport *port = (struct parport *)table->extra1; |
@@ -167,7 +167,7 @@ static int do_hardware_irq (ctl_table *table, int write, | |||
167 | } | 167 | } |
168 | 168 | ||
169 | static int do_hardware_dma (ctl_table *table, int write, | 169 | static int do_hardware_dma (ctl_table *table, int write, |
170 | struct file *filp, void __user *result, | 170 | void __user *result, |
171 | size_t *lenp, loff_t *ppos) | 171 | size_t *lenp, loff_t *ppos) |
172 | { | 172 | { |
173 | struct parport *port = (struct parport *)table->extra1; | 173 | struct parport *port = (struct parport *)table->extra1; |
@@ -195,7 +195,7 @@ static int do_hardware_dma (ctl_table *table, int write, | |||
195 | } | 195 | } |
196 | 196 | ||
197 | static int do_hardware_modes (ctl_table *table, int write, | 197 | static int do_hardware_modes (ctl_table *table, int write, |
198 | struct file *filp, void __user *result, | 198 | void __user *result, |
199 | size_t *lenp, loff_t *ppos) | 199 | size_t *lenp, loff_t *ppos) |
200 | { | 200 | { |
201 | struct parport *port = (struct parport *)table->extra1; | 201 | struct parport *port = (struct parport *)table->extra1; |
diff --git a/fs/coda/coda_int.h b/fs/coda/coda_int.h index 8ccd5ed81d9..d99860a3389 100644 --- a/fs/coda/coda_int.h +++ b/fs/coda/coda_int.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _CODA_INT_ | 2 | #define _CODA_INT_ |
3 | 3 | ||
4 | struct dentry; | 4 | struct dentry; |
5 | struct file; | ||
5 | 6 | ||
6 | extern struct file_system_type coda_fs_type; | 7 | extern struct file_system_type coda_fs_type; |
7 | extern unsigned long coda_timeout; | 8 | extern unsigned long coda_timeout; |
diff --git a/fs/drop_caches.c b/fs/drop_caches.c index a2edb791344..31f4b0e6d72 100644 --- a/fs/drop_caches.c +++ b/fs/drop_caches.c | |||
@@ -63,9 +63,9 @@ static void drop_slab(void) | |||
63 | } | 63 | } |
64 | 64 | ||
65 | int drop_caches_sysctl_handler(ctl_table *table, int write, | 65 | int drop_caches_sysctl_handler(ctl_table *table, int write, |
66 | struct file *file, void __user *buffer, size_t *length, loff_t *ppos) | 66 | void __user *buffer, size_t *length, loff_t *ppos) |
67 | { | 67 | { |
68 | proc_dointvec_minmax(table, write, file, buffer, length, ppos); | 68 | proc_dointvec_minmax(table, write, buffer, length, ppos); |
69 | if (write) { | 69 | if (write) { |
70 | if (sysctl_drop_caches & 1) | 70 | if (sysctl_drop_caches & 1) |
71 | drop_pagecache(); | 71 | drop_pagecache(); |
diff --git a/fs/file_table.c b/fs/file_table.c index 334ce39881f..8eb44042e00 100644 --- a/fs/file_table.c +++ b/fs/file_table.c | |||
@@ -74,14 +74,14 @@ EXPORT_SYMBOL_GPL(get_max_files); | |||
74 | * Handle nr_files sysctl | 74 | * Handle nr_files sysctl |
75 | */ | 75 | */ |
76 | #if defined(CONFIG_SYSCTL) && defined(CONFIG_PROC_FS) | 76 | #if defined(CONFIG_SYSCTL) && defined(CONFIG_PROC_FS) |
77 | int proc_nr_files(ctl_table *table, int write, struct file *filp, | 77 | int proc_nr_files(ctl_table *table, int write, |
78 | void __user *buffer, size_t *lenp, loff_t *ppos) | 78 | void __user *buffer, size_t *lenp, loff_t *ppos) |
79 | { | 79 | { |
80 | files_stat.nr_files = get_nr_files(); | 80 | files_stat.nr_files = get_nr_files(); |
81 | return proc_dointvec(table, write, filp, buffer, lenp, ppos); | 81 | return proc_dointvec(table, write, buffer, lenp, ppos); |
82 | } | 82 | } |
83 | #else | 83 | #else |
84 | int proc_nr_files(ctl_table *table, int write, struct file *filp, | 84 | int proc_nr_files(ctl_table *table, int write, |
85 | void __user *buffer, size_t *lenp, loff_t *ppos) | 85 | void __user *buffer, size_t *lenp, loff_t *ppos) |
86 | { | 86 | { |
87 | return -ENOSYS; | 87 | return -ENOSYS; |
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 9b1e4e9a16b..f667e8aeabd 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c | |||
@@ -153,7 +153,7 @@ static ssize_t proc_sys_call_handler(struct file *filp, void __user *buf, | |||
153 | 153 | ||
154 | /* careful: calling conventions are nasty here */ | 154 | /* careful: calling conventions are nasty here */ |
155 | res = count; | 155 | res = count; |
156 | error = table->proc_handler(table, write, filp, buf, &res, ppos); | 156 | error = table->proc_handler(table, write, buf, &res, ppos); |
157 | if (!error) | 157 | if (!error) |
158 | error = res; | 158 | error = res; |
159 | out: | 159 | out: |
diff --git a/fs/xfs/linux-2.6/xfs_sysctl.c b/fs/xfs/linux-2.6/xfs_sysctl.c index 916c0ffb608..c5bc67c4e3b 100644 --- a/fs/xfs/linux-2.6/xfs_sysctl.c +++ b/fs/xfs/linux-2.6/xfs_sysctl.c | |||
@@ -26,7 +26,6 @@ STATIC int | |||
26 | xfs_stats_clear_proc_handler( | 26 | xfs_stats_clear_proc_handler( |
27 | ctl_table *ctl, | 27 | ctl_table *ctl, |
28 | int write, | 28 | int write, |
29 | struct file *filp, | ||
30 | void __user *buffer, | 29 | void __user *buffer, |
31 | size_t *lenp, | 30 | size_t *lenp, |
32 | loff_t *ppos) | 31 | loff_t *ppos) |
@@ -34,7 +33,7 @@ xfs_stats_clear_proc_handler( | |||
34 | int c, ret, *valp = ctl->data; | 33 | int c, ret, *valp = ctl->data; |
35 | __uint32_t vn_active; | 34 | __uint32_t vn_active; |
36 | 35 | ||
37 | ret = proc_dointvec_minmax(ctl, write, filp, buffer, lenp, ppos); | 36 | ret = proc_dointvec_minmax(ctl, write, buffer, lenp, ppos); |
38 | 37 | ||
39 | if (!ret && write && *valp) { | 38 | if (!ret && write && *valp) { |
40 | printk("XFS Clearing xfsstats\n"); | 39 | printk("XFS Clearing xfsstats\n"); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 51803528b09..33ed6644abd 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2467,7 +2467,7 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf, | |||
2467 | size_t len, loff_t *ppos); | 2467 | size_t len, loff_t *ppos); |
2468 | 2468 | ||
2469 | struct ctl_table; | 2469 | struct ctl_table; |
2470 | int proc_nr_files(struct ctl_table *table, int write, struct file *filp, | 2470 | int proc_nr_files(struct ctl_table *table, int write, |
2471 | void __user *buffer, size_t *lenp, loff_t *ppos); | 2471 | void __user *buffer, size_t *lenp, loff_t *ppos); |
2472 | 2472 | ||
2473 | int __init get_filesystem_list(char *buf); | 2473 | int __init get_filesystem_list(char *buf); |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 3c0924a18da..cd3d2abaf30 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -19,7 +19,7 @@ | |||
19 | extern int ftrace_enabled; | 19 | extern int ftrace_enabled; |
20 | extern int | 20 | extern int |
21 | ftrace_enable_sysctl(struct ctl_table *table, int write, | 21 | ftrace_enable_sysctl(struct ctl_table *table, int write, |
22 | struct file *filp, void __user *buffer, size_t *lenp, | 22 | void __user *buffer, size_t *lenp, |
23 | loff_t *ppos); | 23 | loff_t *ppos); |
24 | 24 | ||
25 | typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip); | 25 | typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip); |
@@ -94,7 +94,7 @@ static inline void ftrace_start(void) { } | |||
94 | extern int stack_tracer_enabled; | 94 | extern int stack_tracer_enabled; |
95 | int | 95 | int |
96 | stack_trace_sysctl(struct ctl_table *table, int write, | 96 | stack_trace_sysctl(struct ctl_table *table, int write, |
97 | struct file *file, void __user *buffer, size_t *lenp, | 97 | void __user *buffer, size_t *lenp, |
98 | loff_t *ppos); | 98 | loff_t *ppos); |
99 | #endif | 99 | #endif |
100 | 100 | ||
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 176e7ee73ef..11ab19ac6b3 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -20,9 +20,9 @@ static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) | |||
20 | } | 20 | } |
21 | 21 | ||
22 | void reset_vma_resv_huge_pages(struct vm_area_struct *vma); | 22 | void reset_vma_resv_huge_pages(struct vm_area_struct *vma); |
23 | int hugetlb_sysctl_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); | 23 | int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); |
24 | int hugetlb_overcommit_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); | 24 | int hugetlb_overcommit_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); |
25 | int hugetlb_treat_movable_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); | 25 | int hugetlb_treat_movable_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); |
26 | int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *); | 26 | int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *); |
27 | int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *, | 27 | int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *, |
28 | struct page **, struct vm_area_struct **, | 28 | struct page **, struct vm_area_struct **, |
diff --git a/include/linux/mm.h b/include/linux/mm.h index b6eae5e3144..87218ae84e3 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1279,7 +1279,7 @@ int in_gate_area_no_task(unsigned long addr); | |||
1279 | #define in_gate_area(task, addr) ({(void)task; in_gate_area_no_task(addr);}) | 1279 | #define in_gate_area(task, addr) ({(void)task; in_gate_area_no_task(addr);}) |
1280 | #endif /* __HAVE_ARCH_GATE_AREA */ | 1280 | #endif /* __HAVE_ARCH_GATE_AREA */ |
1281 | 1281 | ||
1282 | int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *, | 1282 | int drop_caches_sysctl_handler(struct ctl_table *, int, |
1283 | void __user *, size_t *, loff_t *); | 1283 | void __user *, size_t *, loff_t *); |
1284 | unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask, | 1284 | unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask, |
1285 | unsigned long lru_pages); | 1285 | unsigned long lru_pages); |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 652ef01be58..6f7561730d8 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -755,21 +755,20 @@ static inline int is_dma(struct zone *zone) | |||
755 | 755 | ||
756 | /* These two functions are used to setup the per zone pages min values */ | 756 | /* These two functions are used to setup the per zone pages min values */ |
757 | struct ctl_table; | 757 | struct ctl_table; |
758 | struct file; | 758 | int min_free_kbytes_sysctl_handler(struct ctl_table *, int, |
759 | int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *, | ||
760 | void __user *, size_t *, loff_t *); | 759 | void __user *, size_t *, loff_t *); |
761 | extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1]; | 760 | extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1]; |
762 | int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *, | 761 | int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, |
763 | void __user *, size_t *, loff_t *); | 762 | void __user *, size_t *, loff_t *); |
764 | int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, struct file *, | 763 | int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, |
765 | void __user *, size_t *, loff_t *); | 764 | void __user *, size_t *, loff_t *); |
766 | int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int, | 765 | int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int, |
767 | struct file *, void __user *, size_t *, loff_t *); | 766 | void __user *, size_t *, loff_t *); |
768 | int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int, | 767 | int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int, |
769 | struct file *, void __user *, size_t *, loff_t *); | 768 | void __user *, size_t *, loff_t *); |
770 | 769 | ||
771 | extern int numa_zonelist_order_handler(struct ctl_table *, int, | 770 | extern int numa_zonelist_order_handler(struct ctl_table *, int, |
772 | struct file *, void __user *, size_t *, loff_t *); | 771 | void __user *, size_t *, loff_t *); |
773 | extern char numa_zonelist_order[]; | 772 | extern char numa_zonelist_order[]; |
774 | #define NUMA_ZONELIST_ORDER_LEN 16 /* string buffer size */ | 773 | #define NUMA_ZONELIST_ORDER_LEN 16 /* string buffer size */ |
775 | 774 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index e951bd2eb9f..811cd96524d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -309,7 +309,7 @@ extern void softlockup_tick(void); | |||
309 | extern void touch_softlockup_watchdog(void); | 309 | extern void touch_softlockup_watchdog(void); |
310 | extern void touch_all_softlockup_watchdogs(void); | 310 | extern void touch_all_softlockup_watchdogs(void); |
311 | extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write, | 311 | extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write, |
312 | struct file *filp, void __user *buffer, | 312 | void __user *buffer, |
313 | size_t *lenp, loff_t *ppos); | 313 | size_t *lenp, loff_t *ppos); |
314 | extern unsigned int softlockup_panic; | 314 | extern unsigned int softlockup_panic; |
315 | extern int softlockup_thresh; | 315 | extern int softlockup_thresh; |
@@ -331,7 +331,7 @@ extern unsigned long sysctl_hung_task_check_count; | |||
331 | extern unsigned long sysctl_hung_task_timeout_secs; | 331 | extern unsigned long sysctl_hung_task_timeout_secs; |
332 | extern unsigned long sysctl_hung_task_warnings; | 332 | extern unsigned long sysctl_hung_task_warnings; |
333 | extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write, | 333 | extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write, |
334 | struct file *filp, void __user *buffer, | 334 | void __user *buffer, |
335 | size_t *lenp, loff_t *ppos); | 335 | size_t *lenp, loff_t *ppos); |
336 | #endif | 336 | #endif |
337 | 337 | ||
@@ -1906,7 +1906,7 @@ extern unsigned int sysctl_sched_time_avg; | |||
1906 | extern unsigned int sysctl_timer_migration; | 1906 | extern unsigned int sysctl_timer_migration; |
1907 | 1907 | ||
1908 | int sched_nr_latency_handler(struct ctl_table *table, int write, | 1908 | int sched_nr_latency_handler(struct ctl_table *table, int write, |
1909 | struct file *file, void __user *buffer, size_t *length, | 1909 | void __user *buffer, size_t *length, |
1910 | loff_t *ppos); | 1910 | loff_t *ppos); |
1911 | #endif | 1911 | #endif |
1912 | #ifdef CONFIG_SCHED_DEBUG | 1912 | #ifdef CONFIG_SCHED_DEBUG |
@@ -1924,7 +1924,7 @@ extern unsigned int sysctl_sched_rt_period; | |||
1924 | extern int sysctl_sched_rt_runtime; | 1924 | extern int sysctl_sched_rt_runtime; |
1925 | 1925 | ||
1926 | int sched_rt_handler(struct ctl_table *table, int write, | 1926 | int sched_rt_handler(struct ctl_table *table, int write, |
1927 | struct file *filp, void __user *buffer, size_t *lenp, | 1927 | void __user *buffer, size_t *lenp, |
1928 | loff_t *ppos); | 1928 | loff_t *ppos); |
1929 | 1929 | ||
1930 | extern unsigned int sysctl_sched_compat_yield; | 1930 | extern unsigned int sysctl_sched_compat_yield; |
diff --git a/include/linux/security.h b/include/linux/security.h index d050b66ab9e..239e40d0450 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -133,7 +133,7 @@ static inline unsigned long round_hint_to_min(unsigned long hint) | |||
133 | return PAGE_ALIGN(mmap_min_addr); | 133 | return PAGE_ALIGN(mmap_min_addr); |
134 | return hint; | 134 | return hint; |
135 | } | 135 | } |
136 | extern int mmap_min_addr_handler(struct ctl_table *table, int write, struct file *filp, | 136 | extern int mmap_min_addr_handler(struct ctl_table *table, int write, |
137 | void __user *buffer, size_t *lenp, loff_t *ppos); | 137 | void __user *buffer, size_t *lenp, loff_t *ppos); |
138 | 138 | ||
139 | #ifdef CONFIG_SECURITY | 139 | #ifdef CONFIG_SECURITY |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 4c78fea989b..82232dbea3f 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -245,7 +245,7 @@ extern int page_evictable(struct page *page, struct vm_area_struct *vma); | |||
245 | extern void scan_mapping_unevictable_pages(struct address_space *); | 245 | extern void scan_mapping_unevictable_pages(struct address_space *); |
246 | 246 | ||
247 | extern unsigned long scan_unevictable_pages; | 247 | extern unsigned long scan_unevictable_pages; |
248 | extern int scan_unevictable_handler(struct ctl_table *, int, struct file *, | 248 | extern int scan_unevictable_handler(struct ctl_table *, int, |
249 | void __user *, size_t *, loff_t *); | 249 | void __user *, size_t *, loff_t *); |
250 | extern int scan_unevictable_register_node(struct node *node); | 250 | extern int scan_unevictable_register_node(struct node *node); |
251 | extern void scan_unevictable_unregister_node(struct node *node); | 251 | extern void scan_unevictable_unregister_node(struct node *node); |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index e76d3b22a46..1e4743ee683 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
30 | #include <linux/compiler.h> | 30 | #include <linux/compiler.h> |
31 | 31 | ||
32 | struct file; | ||
33 | struct completion; | 32 | struct completion; |
34 | 33 | ||
35 | #define CTL_MAXNAME 10 /* how many path components do we allow in a | 34 | #define CTL_MAXNAME 10 /* how many path components do we allow in a |
@@ -977,25 +976,25 @@ typedef int ctl_handler (struct ctl_table *table, | |||
977 | void __user *oldval, size_t __user *oldlenp, | 976 | void __user *oldval, size_t __user *oldlenp, |
978 | void __user *newval, size_t newlen); | 977 | void __user *newval, size_t newlen); |
979 | 978 | ||
980 | typedef int proc_handler (struct ctl_table *ctl, int write, struct file * filp, | 979 | typedef int proc_handler (struct ctl_table *ctl, int write, |
981 | void __user *buffer, size_t *lenp, loff_t *ppos); | 980 | void __user *buffer, size_t *lenp, loff_t *ppos); |
982 | 981 | ||
983 | extern int proc_dostring(struct ctl_table *, int, struct file *, | 982 | extern int proc_dostring(struct ctl_table *, int, |
984 | void __user *, size_t *, loff_t *); | 983 | void __user *, size_t *, loff_t *); |
985 | extern int proc_dointvec(struct ctl_table *, int, struct file *, | 984 | extern int proc_dointvec(struct ctl_table *, int, |
986 | void __user *, size_t *, loff_t *); | 985 | void __user *, size_t *, loff_t *); |
987 | extern int proc_dointvec_minmax(struct ctl_table *, int, struct file *, | 986 | extern int proc_dointvec_minmax(struct ctl_table *, int, |
988 | void __user *, size_t *, loff_t *); | 987 | void __user *, size_t *, loff_t *); |
989 | extern int proc_dointvec_jiffies(struct ctl_table *, int, struct file *, | 988 | extern int proc_dointvec_jiffies(struct ctl_table *, int, |
990 | void __user *, size_t *, loff_t *); | 989 | void __user *, size_t *, loff_t *); |
991 | extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int, struct file *, | 990 | extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int, |
992 | void __user *, size_t *, loff_t *); | 991 | void __user *, size_t *, loff_t *); |
993 | extern int proc_dointvec_ms_jiffies(struct ctl_table *, int, struct file *, | 992 | extern int proc_dointvec_ms_jiffies(struct ctl_table *, int, |
994 | void __user *, size_t *, loff_t *); | 993 | void __user *, size_t *, loff_t *); |
995 | extern int proc_doulongvec_minmax(struct ctl_table *, int, struct file *, | 994 | extern int proc_doulongvec_minmax(struct ctl_table *, int, |
996 | void __user *, size_t *, loff_t *); | 995 | void __user *, size_t *, loff_t *); |
997 | extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int, | 996 | extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int, |
998 | struct file *, void __user *, size_t *, loff_t *); | 997 | void __user *, size_t *, loff_t *); |
999 | 998 | ||
1000 | extern int do_sysctl (int __user *name, int nlen, | 999 | extern int do_sysctl (int __user *name, int nlen, |
1001 | void __user *oldval, size_t __user *oldlenp, | 1000 | void __user *oldval, size_t __user *oldlenp, |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 75cf58666ff..66ebddcff66 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -110,21 +110,20 @@ extern int laptop_mode; | |||
110 | extern unsigned long determine_dirtyable_memory(void); | 110 | extern unsigned long determine_dirtyable_memory(void); |
111 | 111 | ||
112 | extern int dirty_background_ratio_handler(struct ctl_table *table, int write, | 112 | extern int dirty_background_ratio_handler(struct ctl_table *table, int write, |
113 | struct file *filp, void __user *buffer, size_t *lenp, | 113 | void __user *buffer, size_t *lenp, |
114 | loff_t *ppos); | 114 | loff_t *ppos); |
115 | extern int dirty_background_bytes_handler(struct ctl_table *table, int write, | 115 | extern int dirty_background_bytes_handler(struct ctl_table *table, int write, |
116 | struct file *filp, void __user *buffer, size_t *lenp, | 116 | void __user *buffer, size_t *lenp, |
117 | loff_t *ppos); | 117 | loff_t *ppos); |
118 | extern int dirty_ratio_handler(struct ctl_table *table, int write, | 118 | extern int dirty_ratio_handler(struct ctl_table *table, int write, |
119 | struct file *filp, void __user *buffer, size_t *lenp, | 119 | void __user *buffer, size_t *lenp, |
120 | loff_t *ppos); | 120 | loff_t *ppos); |
121 | extern int dirty_bytes_handler(struct ctl_table *table, int write, | 121 | extern int dirty_bytes_handler(struct ctl_table *table, int write, |
122 | struct file *filp, void __user *buffer, size_t *lenp, | 122 | void __user *buffer, size_t *lenp, |
123 | loff_t *ppos); | 123 | loff_t *ppos); |
124 | 124 | ||
125 | struct ctl_table; | 125 | struct ctl_table; |
126 | struct file; | 126 | int dirty_writeback_centisecs_handler(struct ctl_table *, int, |
127 | int dirty_writeback_centisecs_handler(struct ctl_table *, int, struct file *, | ||
128 | void __user *, size_t *, loff_t *); | 127 | void __user *, size_t *, loff_t *); |
129 | 128 | ||
130 | void get_dirty_limits(unsigned long *pbackground, unsigned long *pdirty, | 129 | void get_dirty_limits(unsigned long *pbackground, unsigned long *pdirty, |
diff --git a/include/net/ip.h b/include/net/ip.h index 72c36926c26..5b26a0bd178 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -399,7 +399,7 @@ extern void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport, | |||
399 | * fed into the routing cache should use these handlers. | 399 | * fed into the routing cache should use these handlers. |
400 | */ | 400 | */ |
401 | int ipv4_doint_and_flush(ctl_table *ctl, int write, | 401 | int ipv4_doint_and_flush(ctl_table *ctl, int write, |
402 | struct file* filp, void __user *buffer, | 402 | void __user *buffer, |
403 | size_t *lenp, loff_t *ppos); | 403 | size_t *lenp, loff_t *ppos); |
404 | int ipv4_doint_and_flush_strategy(ctl_table *table, | 404 | int ipv4_doint_and_flush_strategy(ctl_table *table, |
405 | void __user *oldval, size_t __user *oldlenp, | 405 | void __user *oldval, size_t __user *oldlenp, |
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 1459ed3e269..f76f22d0572 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h | |||
@@ -55,7 +55,6 @@ enum { | |||
55 | #include <net/neighbour.h> | 55 | #include <net/neighbour.h> |
56 | 56 | ||
57 | struct ctl_table; | 57 | struct ctl_table; |
58 | struct file; | ||
59 | struct inet6_dev; | 58 | struct inet6_dev; |
60 | struct net_device; | 59 | struct net_device; |
61 | struct net_proto_family; | 60 | struct net_proto_family; |
@@ -139,7 +138,6 @@ extern int igmp6_event_report(struct sk_buff *skb); | |||
139 | #ifdef CONFIG_SYSCTL | 138 | #ifdef CONFIG_SYSCTL |
140 | extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, | 139 | extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, |
141 | int write, | 140 | int write, |
142 | struct file * filp, | ||
143 | void __user *buffer, | 141 | void __user *buffer, |
144 | size_t *lenp, | 142 | size_t *lenp, |
145 | loff_t *ppos); | 143 | loff_t *ppos); |
diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c index 40eab7314ae..7d3704750ef 100644 --- a/ipc/ipc_sysctl.c +++ b/ipc/ipc_sysctl.c | |||
@@ -27,18 +27,18 @@ static void *get_ipc(ctl_table *table) | |||
27 | } | 27 | } |
28 | 28 | ||
29 | #ifdef CONFIG_PROC_SYSCTL | 29 | #ifdef CONFIG_PROC_SYSCTL |
30 | static int proc_ipc_dointvec(ctl_table *table, int write, struct file *filp, | 30 | static int proc_ipc_dointvec(ctl_table *table, int write, |
31 | void __user *buffer, size_t *lenp, loff_t *ppos) | 31 | void __user *buffer, size_t *lenp, loff_t *ppos) |
32 | { | 32 | { |
33 | struct ctl_table ipc_table; | 33 | struct ctl_table ipc_table; |
34 | memcpy(&ipc_table, table, sizeof(ipc_table)); | 34 | memcpy(&ipc_table, table, sizeof(ipc_table)); |
35 | ipc_table.data = get_ipc(table); | 35 | ipc_table.data = get_ipc(table); |
36 | 36 | ||
37 | return proc_dointvec(&ipc_table, write, filp, buffer, lenp, ppos); | 37 | return proc_dointvec(&ipc_table, write, buffer, lenp, ppos); |
38 | } | 38 | } |
39 | 39 | ||
40 | static int proc_ipc_callback_dointvec(ctl_table *table, int write, | 40 | static int proc_ipc_callback_dointvec(ctl_table *table, int write, |
41 | struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos) | 41 | void __user *buffer, size_t *lenp, loff_t *ppos) |
42 | { | 42 | { |
43 | struct ctl_table ipc_table; | 43 | struct ctl_table ipc_table; |
44 | size_t lenp_bef = *lenp; | 44 | size_t lenp_bef = *lenp; |
@@ -47,7 +47,7 @@ static int proc_ipc_callback_dointvec(ctl_table *table, int write, | |||
47 | memcpy(&ipc_table, table, sizeof(ipc_table)); | 47 | memcpy(&ipc_table, table, sizeof(ipc_table)); |
48 | ipc_table.data = get_ipc(table); | 48 | ipc_table.data = get_ipc(table); |
49 | 49 | ||
50 | rc = proc_dointvec(&ipc_table, write, filp, buffer, lenp, ppos); | 50 | rc = proc_dointvec(&ipc_table, write, buffer, lenp, ppos); |
51 | 51 | ||
52 | if (write && !rc && lenp_bef == *lenp) | 52 | if (write && !rc && lenp_bef == *lenp) |
53 | /* | 53 | /* |
@@ -61,13 +61,13 @@ static int proc_ipc_callback_dointvec(ctl_table *table, int write, | |||
61 | } | 61 | } |
62 | 62 | ||
63 | static int proc_ipc_doulongvec_minmax(ctl_table *table, int write, | 63 | static int proc_ipc_doulongvec_minmax(ctl_table *table, int write, |
64 | struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos) | 64 | void __user *buffer, size_t *lenp, loff_t *ppos) |
65 | { | 65 | { |
66 | struct ctl_table ipc_table; | 66 | struct ctl_table ipc_table; |
67 | memcpy(&ipc_table, table, sizeof(ipc_table)); | 67 | memcpy(&ipc_table, table, sizeof(ipc_table)); |
68 | ipc_table.data = get_ipc(table); | 68 | ipc_table.data = get_ipc(table); |
69 | 69 | ||
70 | return proc_doulongvec_minmax(&ipc_table, write, filp, buffer, | 70 | return proc_doulongvec_minmax(&ipc_table, write, buffer, |
71 | lenp, ppos); | 71 | lenp, ppos); |
72 | } | 72 | } |
73 | 73 | ||
@@ -95,7 +95,7 @@ static void ipc_auto_callback(int val) | |||
95 | } | 95 | } |
96 | 96 | ||
97 | static int proc_ipcauto_dointvec_minmax(ctl_table *table, int write, | 97 | static int proc_ipcauto_dointvec_minmax(ctl_table *table, int write, |
98 | struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos) | 98 | void __user *buffer, size_t *lenp, loff_t *ppos) |
99 | { | 99 | { |
100 | struct ctl_table ipc_table; | 100 | struct ctl_table ipc_table; |
101 | size_t lenp_bef = *lenp; | 101 | size_t lenp_bef = *lenp; |
@@ -106,7 +106,7 @@ static int proc_ipcauto_dointvec_minmax(ctl_table *table, int write, | |||
106 | ipc_table.data = get_ipc(table); | 106 | ipc_table.data = get_ipc(table); |
107 | oldval = *((int *)(ipc_table.data)); | 107 | oldval = *((int *)(ipc_table.data)); |
108 | 108 | ||
109 | rc = proc_dointvec_minmax(&ipc_table, write, filp, buffer, lenp, ppos); | 109 | rc = proc_dointvec_minmax(&ipc_table, write, buffer, lenp, ppos); |
110 | 110 | ||
111 | if (write && !rc && lenp_bef == *lenp) { | 111 | if (write && !rc && lenp_bef == *lenp) { |
112 | int newval = *((int *)(ipc_table.data)); | 112 | int newval = *((int *)(ipc_table.data)); |
diff --git a/ipc/mq_sysctl.c b/ipc/mq_sysctl.c index 24ae46dfe45..8a058711fc1 100644 --- a/ipc/mq_sysctl.c +++ b/ipc/mq_sysctl.c | |||
@@ -31,24 +31,24 @@ static void *get_mq(ctl_table *table) | |||
31 | return which; | 31 | return which; |
32 | } | 32 | } |
33 | 33 | ||
34 | static int proc_mq_dointvec(ctl_table *table, int write, struct file *filp, | 34 | static int proc_mq_dointvec(ctl_table *table, int write, |
35 | void __user *buffer, size_t *lenp, loff_t *ppos) | 35 | void __user *buffer, size_t *lenp, loff_t *ppos) |
36 | { | 36 | { |
37 | struct ctl_table mq_table; | 37 | struct ctl_table mq_table; |
38 | memcpy(&mq_table, table, sizeof(mq_table)); | 38 | memcpy(&mq_table, table, sizeof(mq_table)); |
39 | mq_table.data = get_mq(table); | 39 | mq_table.data = get_mq(table); |
40 | 40 | ||
41 | return proc_dointvec(&mq_table, write, filp, buffer, lenp, ppos); | 41 | return proc_dointvec(&mq_table, write, buffer, lenp, ppos); |
42 | } | 42 | } |
43 | 43 | ||
44 | static int proc_mq_dointvec_minmax(ctl_table *table, int write, | 44 | static int proc_mq_dointvec_minmax(ctl_table *table, int write, |
45 | struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos) | 45 | void __user *buffer, size_t *lenp, loff_t *ppos) |
46 | { | 46 | { |
47 | struct ctl_table mq_table; | 47 | struct ctl_table mq_table; |
48 | memcpy(&mq_table, table, sizeof(mq_table)); | 48 | memcpy(&mq_table, table, sizeof(mq_table)); |
49 | mq_table.data = get_mq(table); | 49 | mq_table.data = get_mq(table); |
50 | 50 | ||
51 | return proc_dointvec_minmax(&mq_table, write, filp, buffer, | 51 | return proc_dointvec_minmax(&mq_table, write, buffer, |
52 | lenp, ppos); | 52 | lenp, ppos); |
53 | } | 53 | } |
54 | #else | 54 | #else |
diff --git a/kernel/hung_task.c b/kernel/hung_task.c index 022a4927b78..d4e84174740 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c | |||
@@ -171,12 +171,12 @@ static unsigned long timeout_jiffies(unsigned long timeout) | |||
171 | * Process updating of timeout sysctl | 171 | * Process updating of timeout sysctl |
172 | */ | 172 | */ |
173 | int proc_dohung_task_timeout_secs(struct ctl_table *table, int write, | 173 | int proc_dohung_task_timeout_secs(struct ctl_table *table, int write, |
174 | struct file *filp, void __user *buffer, | 174 | void __user *buffer, |
175 | size_t *lenp, loff_t *ppos) | 175 | size_t *lenp, loff_t *ppos) |
176 | { | 176 | { |
177 | int ret; | 177 | int ret; |
178 | 178 | ||
179 | ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos); | 179 | ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos); |
180 | 180 | ||
181 | if (ret || !write) | 181 | if (ret || !write) |
182 | goto out; | 182 | goto out; |
diff --git a/kernel/sched.c b/kernel/sched.c index 0d0361b9dbb..ee61f454a98 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -10312,7 +10312,7 @@ static int sched_rt_global_constraints(void) | |||
10312 | #endif /* CONFIG_RT_GROUP_SCHED */ | 10312 | #endif /* CONFIG_RT_GROUP_SCHED */ |
10313 | 10313 | ||
10314 | int sched_rt_handler(struct ctl_table *table, int write, | 10314 | int sched_rt_handler(struct ctl_table *table, int write, |
10315 | struct file *filp, void __user *buffer, size_t *lenp, | 10315 | void __user *buffer, size_t *lenp, |
10316 | loff_t *ppos) | 10316 | loff_t *ppos) |
10317 | { | 10317 | { |
10318 | int ret; | 10318 | int ret; |
@@ -10323,7 +10323,7 @@ int sched_rt_handler(struct ctl_table *table, int write, | |||
10323 | old_period = sysctl_sched_rt_period; | 10323 | old_period = sysctl_sched_rt_period; |
10324 | old_runtime = sysctl_sched_rt_runtime; | 10324 | old_runtime = sysctl_sched_rt_runtime; |
10325 | 10325 | ||
10326 | ret = proc_dointvec(table, write, filp, buffer, lenp, ppos); | 10326 | ret = proc_dointvec(table, write, buffer, lenp, ppos); |
10327 | 10327 | ||
10328 | if (!ret && write) { | 10328 | if (!ret && write) { |
10329 | ret = sched_rt_global_constraints(); | 10329 | ret = sched_rt_global_constraints(); |
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index ecc637a0d59..4e777b47eed 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -384,10 +384,10 @@ static struct sched_entity *__pick_last_entity(struct cfs_rq *cfs_rq) | |||
384 | 384 | ||
385 | #ifdef CONFIG_SCHED_DEBUG | 385 | #ifdef CONFIG_SCHED_DEBUG |
386 | int sched_nr_latency_handler(struct ctl_table *table, int write, | 386 | int sched_nr_latency_handler(struct ctl_table *table, int write, |
387 | struct file *filp, void __user *buffer, size_t *lenp, | 387 | void __user *buffer, size_t *lenp, |
388 | loff_t *ppos) | 388 | loff_t *ppos) |
389 | { | 389 | { |
390 | int ret = proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos); | 390 | int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); |
391 | 391 | ||
392 | if (ret || !write) | 392 | if (ret || !write) |
393 | return ret; | 393 | return ret; |
diff --git a/kernel/slow-work.c b/kernel/slow-work.c index 09d7519557d..0d31135efbf 100644 --- a/kernel/slow-work.c +++ b/kernel/slow-work.c | |||
@@ -26,10 +26,10 @@ static void slow_work_cull_timeout(unsigned long); | |||
26 | static void slow_work_oom_timeout(unsigned long); | 26 | static void slow_work_oom_timeout(unsigned long); |
27 | 27 | ||
28 | #ifdef CONFIG_SYSCTL | 28 | #ifdef CONFIG_SYSCTL |
29 | static int slow_work_min_threads_sysctl(struct ctl_table *, int, struct file *, | 29 | static int slow_work_min_threads_sysctl(struct ctl_table *, int, |
30 | void __user *, size_t *, loff_t *); | 30 | void __user *, size_t *, loff_t *); |
31 | 31 | ||
32 | static int slow_work_max_threads_sysctl(struct ctl_table *, int , struct file *, | 32 | static int slow_work_max_threads_sysctl(struct ctl_table *, int , |
33 | void __user *, size_t *, loff_t *); | 33 | void __user *, size_t *, loff_t *); |
34 | #endif | 34 | #endif |
35 | 35 | ||
@@ -493,10 +493,10 @@ static void slow_work_oom_timeout(unsigned long data) | |||
493 | * Handle adjustment of the minimum number of threads | 493 | * Handle adjustment of the minimum number of threads |
494 | */ | 494 | */ |
495 | static int slow_work_min_threads_sysctl(struct ctl_table *table, int write, | 495 | static int slow_work_min_threads_sysctl(struct ctl_table *table, int write, |
496 | struct file *filp, void __user *buffer, | 496 | void __user *buffer, |
497 | size_t *lenp, loff_t *ppos) | 497 | size_t *lenp, loff_t *ppos) |
498 | { | 498 | { |
499 | int ret = proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos); | 499 | int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); |
500 | int n; | 500 | int n; |
501 | 501 | ||
502 | if (ret == 0) { | 502 | if (ret == 0) { |
@@ -521,10 +521,10 @@ static int slow_work_min_threads_sysctl(struct ctl_table *table, int write, | |||
521 | * Handle adjustment of the maximum number of threads | 521 | * Handle adjustment of the maximum number of threads |
522 | */ | 522 | */ |
523 | static int slow_work_max_threads_sysctl(struct ctl_table *table, int write, | 523 | static int slow_work_max_threads_sysctl(struct ctl_table *table, int write, |
524 | struct file *filp, void __user *buffer, | 524 | void __user *buffer, |
525 | size_t *lenp, loff_t *ppos) | 525 | size_t *lenp, loff_t *ppos) |
526 | { | 526 | { |
527 | int ret = proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos); | 527 | int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); |
528 | int n; | 528 | int n; |
529 | 529 | ||
530 | if (ret == 0) { | 530 | if (ret == 0) { |
diff --git a/kernel/softlockup.c b/kernel/softlockup.c index 88796c33083..81324d12eb3 100644 --- a/kernel/softlockup.c +++ b/kernel/softlockup.c | |||
@@ -90,11 +90,11 @@ void touch_all_softlockup_watchdogs(void) | |||
90 | EXPORT_SYMBOL(touch_all_softlockup_watchdogs); | 90 | EXPORT_SYMBOL(touch_all_softlockup_watchdogs); |
91 | 91 | ||
92 | int proc_dosoftlockup_thresh(struct ctl_table *table, int write, | 92 | int proc_dosoftlockup_thresh(struct ctl_table *table, int write, |
93 | struct file *filp, void __user *buffer, | 93 | void __user *buffer, |
94 | size_t *lenp, loff_t *ppos) | 94 | size_t *lenp, loff_t *ppos) |
95 | { | 95 | { |
96 | touch_all_softlockup_watchdogs(); | 96 | touch_all_softlockup_watchdogs(); |
97 | return proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos); | 97 | return proc_dointvec_minmax(table, write, buffer, lenp, ppos); |
98 | } | 98 | } |
99 | 99 | ||
100 | /* | 100 | /* |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 37abb8c3995..a02697b7cb9 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -163,9 +163,9 @@ extern int max_lock_depth; | |||
163 | #endif | 163 | #endif |
164 | 164 | ||
165 | #ifdef CONFIG_PROC_SYSCTL | 165 | #ifdef CONFIG_PROC_SYSCTL |
166 | static int proc_do_cad_pid(struct ctl_table *table, int write, struct file *filp, | 166 | static int proc_do_cad_pid(struct ctl_table *table, int write, |
167 | void __user *buffer, size_t *lenp, loff_t *ppos); | 167 | void __user *buffer, size_t *lenp, loff_t *ppos); |
168 | static int proc_taint(struct ctl_table *table, int write, struct file *filp, | 168 | static int proc_taint(struct ctl_table *table, int write, |
169 | void __user *buffer, size_t *lenp, loff_t *ppos); | 169 | void __user *buffer, size_t *lenp, loff_t *ppos); |
170 | #endif | 170 | #endif |
171 | 171 | ||
@@ -2226,7 +2226,7 @@ void sysctl_head_put(struct ctl_table_header *head) | |||
2226 | #ifdef CONFIG_PROC_SYSCTL | 2226 | #ifdef CONFIG_PROC_SYSCTL |
2227 | 2227 | ||
2228 | static int _proc_do_string(void* data, int maxlen, int write, | 2228 | static int _proc_do_string(void* data, int maxlen, int write, |
2229 | struct file *filp, void __user *buffer, | 2229 | void __user *buffer, |
2230 | size_t *lenp, loff_t *ppos) | 2230 | size_t *lenp, loff_t *ppos) |
2231 | { | 2231 | { |
2232 | size_t len; | 2232 | size_t len; |
@@ -2287,7 +2287,6 @@ static int _proc_do_string(void* data, int maxlen, int write, | |||
2287 | * proc_dostring - read a string sysctl | 2287 | * proc_dostring - read a string sysctl |
2288 | * @table: the sysctl table | 2288 | * @table: the sysctl table |
2289 | * @write: %TRUE if this is a write to the sysctl file | 2289 | * @write: %TRUE if this is a write to the sysctl file |
2290 | * @filp: the file structure | ||
2291 | * @buffer: the user buffer | 2290 | * @buffer: the user buffer |
2292 | * @lenp: the size of the user buffer | 2291 | * @lenp: the size of the user buffer |
2293 | * @ppos: file position | 2292 | * @ppos: file position |
@@ -2301,10 +2300,10 @@ static int _proc_do_string(void* data, int maxlen, int write, | |||
2301 | * | 2300 | * |
2302 | * Returns 0 on success. | 2301 | * Returns 0 on success. |
2303 | */ | 2302 | */ |
2304 | int proc_dostring(struct ctl_table *table, int write, struct file *filp, | 2303 | int proc_dostring(struct ctl_table *table, int write, |
2305 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2304 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2306 | { | 2305 | { |
2307 | return _proc_do_string(table->data, table->maxlen, write, filp, | 2306 | return _proc_do_string(table->data, table->maxlen, write, |
2308 | buffer, lenp, ppos); | 2307 | buffer, lenp, ppos); |
2309 | } | 2308 | } |
2310 | 2309 | ||
@@ -2329,7 +2328,7 @@ static int do_proc_dointvec_conv(int *negp, unsigned long *lvalp, | |||
2329 | } | 2328 | } |
2330 | 2329 | ||
2331 | static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, | 2330 | static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, |
2332 | int write, struct file *filp, void __user *buffer, | 2331 | int write, void __user *buffer, |
2333 | size_t *lenp, loff_t *ppos, | 2332 | size_t *lenp, loff_t *ppos, |
2334 | int (*conv)(int *negp, unsigned long *lvalp, int *valp, | 2333 | int (*conv)(int *negp, unsigned long *lvalp, int *valp, |
2335 | int write, void *data), | 2334 | int write, void *data), |
@@ -2436,13 +2435,13 @@ static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, | |||
2436 | #undef TMPBUFLEN | 2435 | #undef TMPBUFLEN |
2437 | } | 2436 | } |
2438 | 2437 | ||
2439 | static int do_proc_dointvec(struct ctl_table *table, int write, struct file *filp, | 2438 | static int do_proc_dointvec(struct ctl_table *table, int write, |
2440 | void __user *buffer, size_t *lenp, loff_t *ppos, | 2439 | void __user *buffer, size_t *lenp, loff_t *ppos, |
2441 | int (*conv)(int *negp, unsigned long *lvalp, int *valp, | 2440 | int (*conv)(int *negp, unsigned long *lvalp, int *valp, |
2442 | int write, void *data), | 2441 | int write, void *data), |
2443 | void *data) | 2442 | void *data) |
2444 | { | 2443 | { |
2445 | return __do_proc_dointvec(table->data, table, write, filp, | 2444 | return __do_proc_dointvec(table->data, table, write, |
2446 | buffer, lenp, ppos, conv, data); | 2445 | buffer, lenp, ppos, conv, data); |
2447 | } | 2446 | } |
2448 | 2447 | ||
@@ -2450,7 +2449,6 @@ static int do_proc_dointvec(struct ctl_table *table, int write, struct file *fil | |||
2450 | * proc_dointvec - read a vector of integers | 2449 | * proc_dointvec - read a vector of integers |
2451 | * @table: the sysctl table | 2450 | * @table: the sysctl table |
2452 | * @write: %TRUE if this is a write to the sysctl file | 2451 | * @write: %TRUE if this is a write to the sysctl file |
2453 | * @filp: the file structure | ||
2454 | * @buffer: the user buffer | 2452 | * @buffer: the user buffer |
2455 | * @lenp: the size of the user buffer | 2453 | * @lenp: the size of the user buffer |
2456 | * @ppos: file position | 2454 | * @ppos: file position |
@@ -2460,10 +2458,10 @@ static int do_proc_dointvec(struct ctl_table *table, int write, struct file *fil | |||
2460 | * | 2458 | * |
2461 | * Returns 0 on success. | 2459 | * Returns 0 on success. |
2462 | */ | 2460 | */ |
2463 | int proc_dointvec(struct ctl_table *table, int write, struct file *filp, | 2461 | int proc_dointvec(struct ctl_table *table, int write, |
2464 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2462 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2465 | { | 2463 | { |
2466 | return do_proc_dointvec(table,write,filp,buffer,lenp,ppos, | 2464 | return do_proc_dointvec(table,write,buffer,lenp,ppos, |
2467 | NULL,NULL); | 2465 | NULL,NULL); |
2468 | } | 2466 | } |
2469 | 2467 | ||
@@ -2471,7 +2469,7 @@ int proc_dointvec(struct ctl_table *table, int write, struct file *filp, | |||
2471 | * Taint values can only be increased | 2469 | * Taint values can only be increased |
2472 | * This means we can safely use a temporary. | 2470 | * This means we can safely use a temporary. |
2473 | */ | 2471 | */ |
2474 | static int proc_taint(struct ctl_table *table, int write, struct file *filp, | 2472 | static int proc_taint(struct ctl_table *table, int write, |
2475 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2473 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2476 | { | 2474 | { |
2477 | struct ctl_table t; | 2475 | struct ctl_table t; |
@@ -2483,7 +2481,7 @@ static int proc_taint(struct ctl_table *table, int write, struct file *filp, | |||
2483 | 2481 | ||
2484 | t = *table; | 2482 | t = *table; |
2485 | t.data = &tmptaint; | 2483 | t.data = &tmptaint; |
2486 | err = proc_doulongvec_minmax(&t, write, filp, buffer, lenp, ppos); | 2484 | err = proc_doulongvec_minmax(&t, write, buffer, lenp, ppos); |
2487 | if (err < 0) | 2485 | if (err < 0) |
2488 | return err; | 2486 | return err; |
2489 | 2487 | ||
@@ -2535,7 +2533,6 @@ static int do_proc_dointvec_minmax_conv(int *negp, unsigned long *lvalp, | |||
2535 | * proc_dointvec_minmax - read a vector of integers with min/max values | 2533 | * proc_dointvec_minmax - read a vector of integers with min/max values |
2536 | * @table: the sysctl table | 2534 | * @table: the sysctl table |
2537 | * @write: %TRUE if this is a write to the sysctl file | 2535 | * @write: %TRUE if this is a write to the sysctl file |
2538 | * @filp: the file structure | ||
2539 | * @buffer: the user buffer | 2536 | * @buffer: the user buffer |
2540 | * @lenp: the size of the user buffer | 2537 | * @lenp: the size of the user buffer |
2541 | * @ppos: file position | 2538 | * @ppos: file position |
@@ -2548,19 +2545,18 @@ static int do_proc_dointvec_minmax_conv(int *negp, unsigned long *lvalp, | |||
2548 | * | 2545 | * |
2549 | * Returns 0 on success. | 2546 | * Returns 0 on success. |
2550 | */ | 2547 | */ |
2551 | int proc_dointvec_minmax(struct ctl_table *table, int write, struct file *filp, | 2548 | int proc_dointvec_minmax(struct ctl_table *table, int write, |
2552 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2549 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2553 | { | 2550 | { |
2554 | struct do_proc_dointvec_minmax_conv_param param = { | 2551 | struct do_proc_dointvec_minmax_conv_param param = { |
2555 | .min = (int *) table->extra1, | 2552 | .min = (int *) table->extra1, |
2556 | .max = (int *) table->extra2, | 2553 | .max = (int *) table->extra2, |
2557 | }; | 2554 | }; |
2558 | return do_proc_dointvec(table, write, filp, buffer, lenp, ppos, | 2555 | return do_proc_dointvec(table, write, buffer, lenp, ppos, |
2559 | do_proc_dointvec_minmax_conv, ¶m); | 2556 | do_proc_dointvec_minmax_conv, ¶m); |
2560 | } | 2557 | } |
2561 | 2558 | ||
2562 | static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write, | 2559 | static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write, |
2563 | struct file *filp, | ||
2564 | void __user *buffer, | 2560 | void __user *buffer, |
2565 | size_t *lenp, loff_t *ppos, | 2561 | size_t *lenp, loff_t *ppos, |
2566 | unsigned long convmul, | 2562 | unsigned long convmul, |
@@ -2665,21 +2661,19 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int | |||
2665 | } | 2661 | } |
2666 | 2662 | ||
2667 | static int do_proc_doulongvec_minmax(struct ctl_table *table, int write, | 2663 | static int do_proc_doulongvec_minmax(struct ctl_table *table, int write, |
2668 | struct file *filp, | ||
2669 | void __user *buffer, | 2664 | void __user *buffer, |
2670 | size_t *lenp, loff_t *ppos, | 2665 | size_t *lenp, loff_t *ppos, |
2671 | unsigned long convmul, | 2666 | unsigned long convmul, |
2672 | unsigned long convdiv) | 2667 | unsigned long convdiv) |
2673 | { | 2668 | { |
2674 | return __do_proc_doulongvec_minmax(table->data, table, write, | 2669 | return __do_proc_doulongvec_minmax(table->data, table, write, |
2675 | filp, buffer, lenp, ppos, convmul, convdiv); | 2670 | buffer, lenp, ppos, convmul, convdiv); |
2676 | } | 2671 | } |
2677 | 2672 | ||
2678 | /** | 2673 | /** |
2679 | * proc_doulongvec_minmax - read a vector of long integers with min/max values | 2674 | * proc_doulongvec_minmax - read a vector of long integers with min/max values |
2680 | * @table: the sysctl table | 2675 | * @table: the sysctl table |
2681 | * @write: %TRUE if this is a write to the sysctl file | 2676 | * @write: %TRUE if this is a write to the sysctl file |
2682 | * @filp: the file structure | ||
2683 | * @buffer: the user buffer | 2677 | * @buffer: the user buffer |
2684 | * @lenp: the size of the user buffer | 2678 | * @lenp: the size of the user buffer |
2685 | * @ppos: file position | 2679 | * @ppos: file position |
@@ -2692,17 +2686,16 @@ static int do_proc_doulongvec_minmax(struct ctl_table *table, int write, | |||
2692 | * | 2686 | * |
2693 | * Returns 0 on success. | 2687 | * Returns 0 on success. |
2694 | */ | 2688 | */ |
2695 | int proc_doulongvec_minmax(struct ctl_table *table, int write, struct file *filp, | 2689 | int proc_doulongvec_minmax(struct ctl_table *table, int write, |
2696 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2690 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2697 | { | 2691 | { |
2698 | return do_proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos, 1l, 1l); | 2692 | return do_proc_doulongvec_minmax(table, write, buffer, lenp, ppos, 1l, 1l); |
2699 | } | 2693 | } |
2700 | 2694 | ||
2701 | /** | 2695 | /** |
2702 | * proc_doulongvec_ms_jiffies_minmax - read a vector of millisecond values with min/max values | 2696 | * proc_doulongvec_ms_jiffies_minmax - read a vector of millisecond values with min/max values |
2703 | * @table: the sysctl table | 2697 | * @table: the sysctl table |
2704 | * @write: %TRUE if this is a write to the sysctl file | 2698 | * @write: %TRUE if this is a write to the sysctl file |
2705 | * @filp: the file structure | ||
2706 | * @buffer: the user buffer | 2699 | * @buffer: the user buffer |
2707 | * @lenp: the size of the user buffer | 2700 | * @lenp: the size of the user buffer |
2708 | * @ppos: file position | 2701 | * @ppos: file position |
@@ -2717,11 +2710,10 @@ int proc_doulongvec_minmax(struct ctl_table *table, int write, struct file *filp | |||
2717 | * Returns 0 on success. | 2710 | * Returns 0 on success. |
2718 | */ | 2711 | */ |
2719 | int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, | 2712 | int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, |
2720 | struct file *filp, | ||
2721 | void __user *buffer, | 2713 | void __user *buffer, |
2722 | size_t *lenp, loff_t *ppos) | 2714 | size_t *lenp, loff_t *ppos) |
2723 | { | 2715 | { |
2724 | return do_proc_doulongvec_minmax(table, write, filp, buffer, | 2716 | return do_proc_doulongvec_minmax(table, write, buffer, |
2725 | lenp, ppos, HZ, 1000l); | 2717 | lenp, ppos, HZ, 1000l); |
2726 | } | 2718 | } |
2727 | 2719 | ||
@@ -2797,7 +2789,6 @@ static int do_proc_dointvec_ms_jiffies_conv(int *negp, unsigned long *lvalp, | |||
2797 | * proc_dointvec_jiffies - read a vector of integers as seconds | 2789 | * proc_dointvec_jiffies - read a vector of integers as seconds |
2798 | * @table: the sysctl table | 2790 | * @table: the sysctl table |
2799 | * @write: %TRUE if this is a write to the sysctl file | 2791 | * @write: %TRUE if this is a write to the sysctl file |
2800 | * @filp: the file structure | ||
2801 | * @buffer: the user buffer | 2792 | * @buffer: the user buffer |
2802 | * @lenp: the size of the user buffer | 2793 | * @lenp: the size of the user buffer |
2803 | * @ppos: file position | 2794 | * @ppos: file position |
@@ -2809,10 +2800,10 @@ static int do_proc_dointvec_ms_jiffies_conv(int *negp, unsigned long *lvalp, | |||
2809 | * | 2800 | * |
2810 | * Returns 0 on success. | 2801 | * Returns 0 on success. |
2811 | */ | 2802 | */ |
2812 | int proc_dointvec_jiffies(struct ctl_table *table, int write, struct file *filp, | 2803 | int proc_dointvec_jiffies(struct ctl_table *table, int write, |
2813 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2804 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2814 | { | 2805 | { |
2815 | return do_proc_dointvec(table,write,filp,buffer,lenp,ppos, | 2806 | return do_proc_dointvec(table,write,buffer,lenp,ppos, |
2816 | do_proc_dointvec_jiffies_conv,NULL); | 2807 | do_proc_dointvec_jiffies_conv,NULL); |
2817 | } | 2808 | } |
2818 | 2809 | ||
@@ -2820,7 +2811,6 @@ int proc_dointvec_jiffies(struct ctl_table *table, int write, struct file *filp, | |||
2820 | * proc_dointvec_userhz_jiffies - read a vector of integers as 1/USER_HZ seconds | 2811 | * proc_dointvec_userhz_jiffies - read a vector of integers as 1/USER_HZ seconds |
2821 | * @table: the sysctl table | 2812 | * @table: the sysctl table |
2822 | * @write: %TRUE if this is a write to the sysctl file | 2813 | * @write: %TRUE if this is a write to the sysctl file |
2823 | * @filp: the file structure | ||
2824 | * @buffer: the user buffer | 2814 | * @buffer: the user buffer |
2825 | * @lenp: the size of the user buffer | 2815 | * @lenp: the size of the user buffer |
2826 | * @ppos: pointer to the file position | 2816 | * @ppos: pointer to the file position |
@@ -2832,10 +2822,10 @@ int proc_dointvec_jiffies(struct ctl_table *table, int write, struct file *filp, | |||
2832 | * | 2822 | * |
2833 | * Returns 0 on success. | 2823 | * Returns 0 on success. |
2834 | */ | 2824 | */ |
2835 | int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, struct file *filp, | 2825 | int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, |
2836 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2826 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2837 | { | 2827 | { |
2838 | return do_proc_dointvec(table,write,filp,buffer,lenp,ppos, | 2828 | return do_proc_dointvec(table,write,buffer,lenp,ppos, |
2839 | do_proc_dointvec_userhz_jiffies_conv,NULL); | 2829 | do_proc_dointvec_userhz_jiffies_conv,NULL); |
2840 | } | 2830 | } |
2841 | 2831 | ||
@@ -2843,7 +2833,6 @@ int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, struct file | |||
2843 | * proc_dointvec_ms_jiffies - read a vector of integers as 1 milliseconds | 2833 | * proc_dointvec_ms_jiffies - read a vector of integers as 1 milliseconds |
2844 | * @table: the sysctl table | 2834 | * @table: the sysctl table |
2845 | * @write: %TRUE if this is a write to the sysctl file | 2835 | * @write: %TRUE if this is a write to the sysctl file |
2846 | * @filp: the file structure | ||
2847 | * @buffer: the user buffer | 2836 | * @buffer: the user buffer |
2848 | * @lenp: the size of the user buffer | 2837 | * @lenp: the size of the user buffer |
2849 | * @ppos: file position | 2838 | * @ppos: file position |
@@ -2856,14 +2845,14 @@ int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, struct file | |||
2856 | * | 2845 | * |
2857 | * Returns 0 on success. | 2846 | * Returns 0 on success. |
2858 | */ | 2847 | */ |
2859 | int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, struct file *filp, | 2848 | int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, |
2860 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2849 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2861 | { | 2850 | { |
2862 | return do_proc_dointvec(table, write, filp, buffer, lenp, ppos, | 2851 | return do_proc_dointvec(table, write, buffer, lenp, ppos, |
2863 | do_proc_dointvec_ms_jiffies_conv, NULL); | 2852 | do_proc_dointvec_ms_jiffies_conv, NULL); |
2864 | } | 2853 | } |
2865 | 2854 | ||
2866 | static int proc_do_cad_pid(struct ctl_table *table, int write, struct file *filp, | 2855 | static int proc_do_cad_pid(struct ctl_table *table, int write, |
2867 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2856 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2868 | { | 2857 | { |
2869 | struct pid *new_pid; | 2858 | struct pid *new_pid; |
@@ -2872,7 +2861,7 @@ static int proc_do_cad_pid(struct ctl_table *table, int write, struct file *filp | |||
2872 | 2861 | ||
2873 | tmp = pid_vnr(cad_pid); | 2862 | tmp = pid_vnr(cad_pid); |
2874 | 2863 | ||
2875 | r = __do_proc_dointvec(&tmp, table, write, filp, buffer, | 2864 | r = __do_proc_dointvec(&tmp, table, write, buffer, |
2876 | lenp, ppos, NULL, NULL); | 2865 | lenp, ppos, NULL, NULL); |
2877 | if (r || !write) | 2866 | if (r || !write) |
2878 | return r; | 2867 | return r; |
@@ -2887,50 +2876,49 @@ static int proc_do_cad_pid(struct ctl_table *table, int write, struct file *filp | |||
2887 | 2876 | ||
2888 | #else /* CONFIG_PROC_FS */ | 2877 | #else /* CONFIG_PROC_FS */ |
2889 | 2878 | ||
2890 | int proc_dostring(struct ctl_table *table, int write, struct file *filp, | 2879 | int proc_dostring(struct ctl_table *table, int write, |
2891 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2880 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2892 | { | 2881 | { |
2893 | return -ENOSYS; | 2882 | return -ENOSYS; |
2894 | } | 2883 | } |
2895 | 2884 | ||
2896 | int proc_dointvec(struct ctl_table *table, int write, struct file *filp, | 2885 | int proc_dointvec(struct ctl_table *table, int write, |
2897 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2886 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2898 | { | 2887 | { |
2899 | return -ENOSYS; | 2888 | return -ENOSYS; |
2900 | } | 2889 | } |
2901 | 2890 | ||
2902 | int proc_dointvec_minmax(struct ctl_table *table, int write, struct file *filp, | 2891 | int proc_dointvec_minmax(struct ctl_table *table, int write, |
2903 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2892 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2904 | { | 2893 | { |
2905 | return -ENOSYS; | 2894 | return -ENOSYS; |
2906 | } | 2895 | } |
2907 | 2896 | ||
2908 | int proc_dointvec_jiffies(struct ctl_table *table, int write, struct file *filp, | 2897 | int proc_dointvec_jiffies(struct ctl_table *table, int write, |
2909 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2898 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2910 | { | 2899 | { |
2911 | return -ENOSYS; | 2900 | return -ENOSYS; |
2912 | } | 2901 | } |
2913 | 2902 | ||
2914 | int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, struct file *filp, | 2903 | int proc_dointvec_userhz_jiffies(struct ctl_table *table, int write, |
2915 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2904 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2916 | { | 2905 | { |
2917 | return -ENOSYS; | 2906 | return -ENOSYS; |
2918 | } | 2907 | } |
2919 | 2908 | ||
2920 | int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, struct file *filp, | 2909 | int proc_dointvec_ms_jiffies(struct ctl_table *table, int write, |
2921 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2910 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2922 | { | 2911 | { |
2923 | return -ENOSYS; | 2912 | return -ENOSYS; |
2924 | } | 2913 | } |
2925 | 2914 | ||
2926 | int proc_doulongvec_minmax(struct ctl_table *table, int write, struct file *filp, | 2915 | int proc_doulongvec_minmax(struct ctl_table *table, int write, |
2927 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2916 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2928 | { | 2917 | { |
2929 | return -ENOSYS; | 2918 | return -ENOSYS; |
2930 | } | 2919 | } |
2931 | 2920 | ||
2932 | int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, | 2921 | int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write, |
2933 | struct file *filp, | ||
2934 | void __user *buffer, | 2922 | void __user *buffer, |
2935 | size_t *lenp, loff_t *ppos) | 2923 | size_t *lenp, loff_t *ppos) |
2936 | { | 2924 | { |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 23df7771c93..a142579765b 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -3015,7 +3015,7 @@ int unregister_ftrace_function(struct ftrace_ops *ops) | |||
3015 | 3015 | ||
3016 | int | 3016 | int |
3017 | ftrace_enable_sysctl(struct ctl_table *table, int write, | 3017 | ftrace_enable_sysctl(struct ctl_table *table, int write, |
3018 | struct file *file, void __user *buffer, size_t *lenp, | 3018 | void __user *buffer, size_t *lenp, |
3019 | loff_t *ppos) | 3019 | loff_t *ppos) |
3020 | { | 3020 | { |
3021 | int ret; | 3021 | int ret; |
@@ -3025,7 +3025,7 @@ ftrace_enable_sysctl(struct ctl_table *table, int write, | |||
3025 | 3025 | ||
3026 | mutex_lock(&ftrace_lock); | 3026 | mutex_lock(&ftrace_lock); |
3027 | 3027 | ||
3028 | ret = proc_dointvec(table, write, file, buffer, lenp, ppos); | 3028 | ret = proc_dointvec(table, write, buffer, lenp, ppos); |
3029 | 3029 | ||
3030 | if (ret || !write || (last_ftrace_enabled == !!ftrace_enabled)) | 3030 | if (ret || !write || (last_ftrace_enabled == !!ftrace_enabled)) |
3031 | goto out; | 3031 | goto out; |
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c index 0f6facb050a..8504ac71e4e 100644 --- a/kernel/trace/trace_stack.c +++ b/kernel/trace/trace_stack.c | |||
@@ -296,14 +296,14 @@ static const struct file_operations stack_trace_fops = { | |||
296 | 296 | ||
297 | int | 297 | int |
298 | stack_trace_sysctl(struct ctl_table *table, int write, | 298 | stack_trace_sysctl(struct ctl_table *table, int write, |
299 | struct file *file, void __user *buffer, size_t *lenp, | 299 | void __user *buffer, size_t *lenp, |
300 | loff_t *ppos) | 300 | loff_t *ppos) |
301 | { | 301 | { |
302 | int ret; | 302 | int ret; |
303 | 303 | ||
304 | mutex_lock(&stack_sysctl_mutex); | 304 | mutex_lock(&stack_sysctl_mutex); |
305 | 305 | ||
306 | ret = proc_dointvec(table, write, file, buffer, lenp, ppos); | 306 | ret = proc_dointvec(table, write, buffer, lenp, ppos); |
307 | 307 | ||
308 | if (ret || !write || | 308 | if (ret || !write || |
309 | (last_stack_tracer_enabled == !!stack_tracer_enabled)) | 309 | (last_stack_tracer_enabled == !!stack_tracer_enabled)) |
diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c index 92359cc747a..69eae358a72 100644 --- a/kernel/utsname_sysctl.c +++ b/kernel/utsname_sysctl.c | |||
@@ -42,14 +42,14 @@ static void put_uts(ctl_table *table, int write, void *which) | |||
42 | * Special case of dostring for the UTS structure. This has locks | 42 | * Special case of dostring for the UTS structure. This has locks |
43 | * to observe. Should this be in kernel/sys.c ???? | 43 | * to observe. Should this be in kernel/sys.c ???? |
44 | */ | 44 | */ |
45 | static int proc_do_uts_string(ctl_table *table, int write, struct file *filp, | 45 | static int proc_do_uts_string(ctl_table *table, int write, |
46 | void __user *buffer, size_t *lenp, loff_t *ppos) | 46 | void __user *buffer, size_t *lenp, loff_t *ppos) |
47 | { | 47 | { |
48 | struct ctl_table uts_table; | 48 | struct ctl_table uts_table; |
49 | int r; | 49 | int r; |
50 | memcpy(&uts_table, table, sizeof(uts_table)); | 50 | memcpy(&uts_table, table, sizeof(uts_table)); |
51 | uts_table.data = get_uts(table, write); | 51 | uts_table.data = get_uts(table, write); |
52 | r = proc_dostring(&uts_table,write,filp,buffer,lenp, ppos); | 52 | r = proc_dostring(&uts_table,write,buffer,lenp, ppos); |
53 | put_uts(table, write, uts_table.data); | 53 | put_uts(table, write, uts_table.data); |
54 | return r; | 54 | return r; |
55 | } | 55 | } |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 815dbd4a6dc..6f048fcc749 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -1537,7 +1537,7 @@ static unsigned int cpuset_mems_nr(unsigned int *array) | |||
1537 | 1537 | ||
1538 | #ifdef CONFIG_SYSCTL | 1538 | #ifdef CONFIG_SYSCTL |
1539 | int hugetlb_sysctl_handler(struct ctl_table *table, int write, | 1539 | int hugetlb_sysctl_handler(struct ctl_table *table, int write, |
1540 | struct file *file, void __user *buffer, | 1540 | void __user *buffer, |
1541 | size_t *length, loff_t *ppos) | 1541 | size_t *length, loff_t *ppos) |
1542 | { | 1542 | { |
1543 | struct hstate *h = &default_hstate; | 1543 | struct hstate *h = &default_hstate; |
@@ -1548,7 +1548,7 @@ int hugetlb_sysctl_handler(struct ctl_table *table, int write, | |||
1548 | 1548 | ||
1549 | table->data = &tmp; | 1549 | table->data = &tmp; |
1550 | table->maxlen = sizeof(unsigned long); | 1550 | table->maxlen = sizeof(unsigned long); |
1551 | proc_doulongvec_minmax(table, write, file, buffer, length, ppos); | 1551 | proc_doulongvec_minmax(table, write, buffer, length, ppos); |
1552 | 1552 | ||
1553 | if (write) | 1553 | if (write) |
1554 | h->max_huge_pages = set_max_huge_pages(h, tmp); | 1554 | h->max_huge_pages = set_max_huge_pages(h, tmp); |
@@ -1557,10 +1557,10 @@ int hugetlb_sysctl_handler(struct ctl_table *table, int write, | |||
1557 | } | 1557 | } |
1558 | 1558 | ||
1559 | int hugetlb_treat_movable_handler(struct ctl_table *table, int write, | 1559 | int hugetlb_treat_movable_handler(struct ctl_table *table, int write, |
1560 | struct file *file, void __user *buffer, | 1560 | void __user *buffer, |
1561 | size_t *length, loff_t *ppos) | 1561 | size_t *length, loff_t *ppos) |
1562 | { | 1562 | { |
1563 | proc_dointvec(table, write, file, buffer, length, ppos); | 1563 | proc_dointvec(table, write, buffer, length, ppos); |
1564 | if (hugepages_treat_as_movable) | 1564 | if (hugepages_treat_as_movable) |
1565 | htlb_alloc_mask = GFP_HIGHUSER_MOVABLE; | 1565 | htlb_alloc_mask = GFP_HIGHUSER_MOVABLE; |
1566 | else | 1566 | else |
@@ -1569,7 +1569,7 @@ int hugetlb_treat_movable_handler(struct ctl_table *table, int write, | |||
1569 | } | 1569 | } |
1570 | 1570 | ||
1571 | int hugetlb_overcommit_handler(struct ctl_table *table, int write, | 1571 | int hugetlb_overcommit_handler(struct ctl_table *table, int write, |
1572 | struct file *file, void __user *buffer, | 1572 | void __user *buffer, |
1573 | size_t *length, loff_t *ppos) | 1573 | size_t *length, loff_t *ppos) |
1574 | { | 1574 | { |
1575 | struct hstate *h = &default_hstate; | 1575 | struct hstate *h = &default_hstate; |
@@ -1580,7 +1580,7 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write, | |||
1580 | 1580 | ||
1581 | table->data = &tmp; | 1581 | table->data = &tmp; |
1582 | table->maxlen = sizeof(unsigned long); | 1582 | table->maxlen = sizeof(unsigned long); |
1583 | proc_doulongvec_minmax(table, write, file, buffer, length, ppos); | 1583 | proc_doulongvec_minmax(table, write, buffer, length, ppos); |
1584 | 1584 | ||
1585 | if (write) { | 1585 | if (write) { |
1586 | spin_lock(&hugetlb_lock); | 1586 | spin_lock(&hugetlb_lock); |
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 5f378dd5880..be197f71b09 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -155,37 +155,37 @@ static void update_completion_period(void) | |||
155 | } | 155 | } |
156 | 156 | ||
157 | int dirty_background_ratio_handler(struct ctl_table *table, int write, | 157 | int dirty_background_ratio_handler(struct ctl_table *table, int write, |
158 | struct file *filp, void __user *buffer, size_t *lenp, | 158 | void __user *buffer, size_t *lenp, |
159 | loff_t *ppos) | 159 | loff_t *ppos) |
160 | { | 160 | { |
161 | int ret; | 161 | int ret; |
162 | 162 | ||
163 | ret = proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos); | 163 | ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); |
164 | if (ret == 0 && write) | 164 | if (ret == 0 && write) |
165 | dirty_background_bytes = 0; | 165 | dirty_background_bytes = 0; |
166 | return ret; | 166 | return ret; |
167 | } | 167 | } |
168 | 168 | ||
169 | int dirty_background_bytes_handler(struct ctl_table *table, int write, | 169 | int dirty_background_bytes_handler(struct ctl_table *table, int write, |
170 | struct file *filp, void __user *buffer, size_t *lenp, | 170 | void __user *buffer, size_t *lenp, |
171 | loff_t *ppos) | 171 | loff_t *ppos) |
172 | { | 172 | { |
173 | int ret; | 173 | int ret; |
174 | 174 | ||
175 | ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos); | 175 | ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos); |
176 | if (ret == 0 && write) | 176 | if (ret == 0 && write) |
177 | dirty_background_ratio = 0; | 177 | dirty_background_ratio = 0; |
178 | return ret; | 178 | return ret; |
179 | } | 179 | } |
180 | 180 | ||
181 | int dirty_ratio_handler(struct ctl_table *table, int write, | 181 | int dirty_ratio_handler(struct ctl_table *table, int write, |
182 | struct file *filp, void __user *buffer, size_t *lenp, | 182 | void __user *buffer, size_t *lenp, |
183 | loff_t *ppos) | 183 | loff_t *ppos) |
184 | { | 184 | { |
185 | int old_ratio = vm_dirty_ratio; | 185 | int old_ratio = vm_dirty_ratio; |
186 | int ret; | 186 | int ret; |
187 | 187 | ||
188 | ret = proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos); | 188 | ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); |
189 | if (ret == 0 && write && vm_dirty_ratio != old_ratio) { | 189 | if (ret == 0 && write && vm_dirty_ratio != old_ratio) { |
190 | update_completion_period(); | 190 | update_completion_period(); |
191 | vm_dirty_bytes = 0; | 191 | vm_dirty_bytes = 0; |
@@ -195,13 +195,13 @@ int dirty_ratio_handler(struct ctl_table *table, int write, | |||
195 | 195 | ||
196 | 196 | ||
197 | int dirty_bytes_handler(struct ctl_table *table, int write, | 197 | int dirty_bytes_handler(struct ctl_table *table, int write, |
198 | struct file *filp, void __user *buffer, size_t *lenp, | 198 | void __user *buffer, size_t *lenp, |
199 | loff_t *ppos) | 199 | loff_t *ppos) |
200 | { | 200 | { |
201 | unsigned long old_bytes = vm_dirty_bytes; | 201 | unsigned long old_bytes = vm_dirty_bytes; |
202 | int ret; | 202 | int ret; |
203 | 203 | ||
204 | ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos); | 204 | ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos); |
205 | if (ret == 0 && write && vm_dirty_bytes != old_bytes) { | 205 | if (ret == 0 && write && vm_dirty_bytes != old_bytes) { |
206 | update_completion_period(); | 206 | update_completion_period(); |
207 | vm_dirty_ratio = 0; | 207 | vm_dirty_ratio = 0; |
@@ -686,9 +686,9 @@ static DEFINE_TIMER(laptop_mode_wb_timer, laptop_timer_fn, 0, 0); | |||
686 | * sysctl handler for /proc/sys/vm/dirty_writeback_centisecs | 686 | * sysctl handler for /proc/sys/vm/dirty_writeback_centisecs |
687 | */ | 687 | */ |
688 | int dirty_writeback_centisecs_handler(ctl_table *table, int write, | 688 | int dirty_writeback_centisecs_handler(ctl_table *table, int write, |
689 | struct file *file, void __user *buffer, size_t *length, loff_t *ppos) | 689 | void __user *buffer, size_t *length, loff_t *ppos) |
690 | { | 690 | { |
691 | proc_dointvec(table, write, file, buffer, length, ppos); | 691 | proc_dointvec(table, write, buffer, length, ppos); |
692 | return 0; | 692 | return 0; |
693 | } | 693 | } |
694 | 694 | ||
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 5717f27a070..88248b3c20b 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -2373,7 +2373,7 @@ early_param("numa_zonelist_order", setup_numa_zonelist_order); | |||
2373 | * sysctl handler for numa_zonelist_order | 2373 | * sysctl handler for numa_zonelist_order |
2374 | */ | 2374 | */ |
2375 | int numa_zonelist_order_handler(ctl_table *table, int write, | 2375 | int numa_zonelist_order_handler(ctl_table *table, int write, |
2376 | struct file *file, void __user *buffer, size_t *length, | 2376 | void __user *buffer, size_t *length, |
2377 | loff_t *ppos) | 2377 | loff_t *ppos) |
2378 | { | 2378 | { |
2379 | char saved_string[NUMA_ZONELIST_ORDER_LEN]; | 2379 | char saved_string[NUMA_ZONELIST_ORDER_LEN]; |
@@ -2382,7 +2382,7 @@ int numa_zonelist_order_handler(ctl_table *table, int write, | |||
2382 | if (write) | 2382 | if (write) |
2383 | strncpy(saved_string, (char*)table->data, | 2383 | strncpy(saved_string, (char*)table->data, |
2384 | NUMA_ZONELIST_ORDER_LEN); | 2384 | NUMA_ZONELIST_ORDER_LEN); |
2385 | ret = proc_dostring(table, write, file, buffer, length, ppos); | 2385 | ret = proc_dostring(table, write, buffer, length, ppos); |
2386 | if (ret) | 2386 | if (ret) |
2387 | return ret; | 2387 | return ret; |
2388 | if (write) { | 2388 | if (write) { |
@@ -4706,9 +4706,9 @@ module_init(init_per_zone_wmark_min) | |||
4706 | * changes. | 4706 | * changes. |
4707 | */ | 4707 | */ |
4708 | int min_free_kbytes_sysctl_handler(ctl_table *table, int write, | 4708 | int min_free_kbytes_sysctl_handler(ctl_table *table, int write, |
4709 | struct file *file, void __user *buffer, size_t *length, loff_t *ppos) | 4709 | void __user *buffer, size_t *length, loff_t *ppos) |
4710 | { | 4710 | { |
4711 | proc_dointvec(table, write, file, buffer, length, ppos); | 4711 | proc_dointvec(table, write, buffer, length, ppos); |
4712 | if (write) | 4712 | if (write) |
4713 | setup_per_zone_wmarks(); | 4713 | setup_per_zone_wmarks(); |
4714 | return 0; | 4714 | return 0; |
@@ -4716,12 +4716,12 @@ int min_free_kbytes_sysctl_handler(ctl_table *table, int write, | |||
4716 | 4716 | ||
4717 | #ifdef CONFIG_NUMA | 4717 | #ifdef CONFIG_NUMA |
4718 | int sysctl_min_unmapped_ratio_sysctl_handler(ctl_table *table, int write, | 4718 | int sysctl_min_unmapped_ratio_sysctl_handler(ctl_table *table, int write, |
4719 | struct file *file, void __user *buffer, size_t *length, loff_t *ppos) | 4719 | void __user *buffer, size_t *length, loff_t *ppos) |
4720 | { | 4720 | { |
4721 | struct zone *zone; | 4721 | struct zone *zone; |
4722 | int rc; | 4722 | int rc; |
4723 | 4723 | ||
4724 | rc = proc_dointvec_minmax(table, write, file, buffer, length, ppos); | 4724 | rc = proc_dointvec_minmax(table, write, buffer, length, ppos); |
4725 | if (rc) | 4725 | if (rc) |
4726 | return rc; | 4726 | return rc; |
4727 | 4727 | ||
@@ -4732,12 +4732,12 @@ int sysctl_min_unmapped_ratio_sysctl_handler(ctl_table *table, int write, | |||
4732 | } | 4732 | } |
4733 | 4733 | ||
4734 | int sysctl_min_slab_ratio_sysctl_handler(ctl_table *table, int write, | 4734 | int sysctl_min_slab_ratio_sysctl_handler(ctl_table *table, int write, |
4735 | struct file *file, void __user *buffer, size_t *length, loff_t *ppos) | 4735 | void __user *buffer, size_t *length, loff_t *ppos) |
4736 | { | 4736 | { |
4737 | struct zone *zone; | 4737 | struct zone *zone; |
4738 | int rc; | 4738 | int rc; |
4739 | 4739 | ||
4740 | rc = proc_dointvec_minmax(table, write, file, buffer, length, ppos); | 4740 | rc = proc_dointvec_minmax(table, write, buffer, length, ppos); |
4741 | if (rc) | 4741 | if (rc) |
4742 | return rc; | 4742 | return rc; |
4743 | 4743 | ||
@@ -4758,9 +4758,9 @@ int sysctl_min_slab_ratio_sysctl_handler(ctl_table *table, int write, | |||
4758 | * if in function of the boot time zone sizes. | 4758 | * if in function of the boot time zone sizes. |
4759 | */ | 4759 | */ |
4760 | int lowmem_reserve_ratio_sysctl_handler(ctl_table *table, int write, | 4760 | int lowmem_reserve_ratio_sysctl_handler(ctl_table *table, int write, |
4761 | struct file *file, void __user *buffer, size_t *length, loff_t *ppos) | 4761 | void __user *buffer, size_t *length, loff_t *ppos) |
4762 | { | 4762 | { |
4763 | proc_dointvec_minmax(table, write, file, buffer, length, ppos); | 4763 | proc_dointvec_minmax(table, write, buffer, length, ppos); |
4764 | setup_per_zone_lowmem_reserve(); | 4764 | setup_per_zone_lowmem_reserve(); |
4765 | return 0; | 4765 | return 0; |
4766 | } | 4766 | } |
@@ -4772,13 +4772,13 @@ int lowmem_reserve_ratio_sysctl_handler(ctl_table *table, int write, | |||
4772 | */ | 4772 | */ |
4773 | 4773 | ||
4774 | int percpu_pagelist_fraction_sysctl_handler(ctl_table *table, int write, | 4774 | int percpu_pagelist_fraction_sysctl_handler(ctl_table *table, int write, |
4775 | struct file *file, void __user *buffer, size_t *length, loff_t *ppos) | 4775 | void __user *buffer, size_t *length, loff_t *ppos) |
4776 | { | 4776 | { |
4777 | struct zone *zone; | 4777 | struct zone *zone; |
4778 | unsigned int cpu; | 4778 | unsigned int cpu; |
4779 | int ret; | 4779 | int ret; |
4780 | 4780 | ||
4781 | ret = proc_dointvec_minmax(table, write, file, buffer, length, ppos); | 4781 | ret = proc_dointvec_minmax(table, write, buffer, length, ppos); |
4782 | if (!write || (ret == -EINVAL)) | 4782 | if (!write || (ret == -EINVAL)) |
4783 | return ret; | 4783 | return ret; |
4784 | for_each_populated_zone(zone) { | 4784 | for_each_populated_zone(zone) { |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 2423782214a..f444b740908 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -2844,10 +2844,10 @@ static void scan_all_zones_unevictable_pages(void) | |||
2844 | unsigned long scan_unevictable_pages; | 2844 | unsigned long scan_unevictable_pages; |
2845 | 2845 | ||
2846 | int scan_unevictable_handler(struct ctl_table *table, int write, | 2846 | int scan_unevictable_handler(struct ctl_table *table, int write, |
2847 | struct file *file, void __user *buffer, | 2847 | void __user *buffer, |
2848 | size_t *length, loff_t *ppos) | 2848 | size_t *length, loff_t *ppos) |
2849 | { | 2849 | { |
2850 | proc_doulongvec_minmax(table, write, file, buffer, length, ppos); | 2850 | proc_doulongvec_minmax(table, write, buffer, length, ppos); |
2851 | 2851 | ||
2852 | if (write && *(unsigned long *)table->data) | 2852 | if (write && *(unsigned long *)table->data) |
2853 | scan_all_zones_unevictable_pages(); | 2853 | scan_all_zones_unevictable_pages(); |
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index 907a82e9023..a16a2342f6b 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c | |||
@@ -965,12 +965,12 @@ static struct nf_hook_ops br_nf_ops[] __read_mostly = { | |||
965 | 965 | ||
966 | #ifdef CONFIG_SYSCTL | 966 | #ifdef CONFIG_SYSCTL |
967 | static | 967 | static |
968 | int brnf_sysctl_call_tables(ctl_table * ctl, int write, struct file *filp, | 968 | int brnf_sysctl_call_tables(ctl_table * ctl, int write, |
969 | void __user * buffer, size_t * lenp, loff_t * ppos) | 969 | void __user * buffer, size_t * lenp, loff_t * ppos) |
970 | { | 970 | { |
971 | int ret; | 971 | int ret; |
972 | 972 | ||
973 | ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); | 973 | ret = proc_dointvec(ctl, write, buffer, lenp, ppos); |
974 | 974 | ||
975 | if (write && *(int *)(ctl->data)) | 975 | if (write && *(int *)(ctl->data)) |
976 | *(int *)(ctl->data) = 1; | 976 | *(int *)(ctl->data) = 1; |
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index 1c6a5bb6f0c..6e1f085db06 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c | |||
@@ -164,7 +164,7 @@ static int max_t3[] = { 8191 }; /* Must fit in 16 bits when multiplied by BCT3MU | |||
164 | static int min_priority[1]; | 164 | static int min_priority[1]; |
165 | static int max_priority[] = { 127 }; /* From DECnet spec */ | 165 | static int max_priority[] = { 127 }; /* From DECnet spec */ |
166 | 166 | ||
167 | static int dn_forwarding_proc(ctl_table *, int, struct file *, | 167 | static int dn_forwarding_proc(ctl_table *, int, |
168 | void __user *, size_t *, loff_t *); | 168 | void __user *, size_t *, loff_t *); |
169 | static int dn_forwarding_sysctl(ctl_table *table, | 169 | static int dn_forwarding_sysctl(ctl_table *table, |
170 | void __user *oldval, size_t __user *oldlenp, | 170 | void __user *oldval, size_t __user *oldlenp, |
@@ -274,7 +274,6 @@ static void dn_dev_sysctl_unregister(struct dn_dev_parms *parms) | |||
274 | } | 274 | } |
275 | 275 | ||
276 | static int dn_forwarding_proc(ctl_table *table, int write, | 276 | static int dn_forwarding_proc(ctl_table *table, int write, |
277 | struct file *filep, | ||
278 | void __user *buffer, | 277 | void __user *buffer, |
279 | size_t *lenp, loff_t *ppos) | 278 | size_t *lenp, loff_t *ppos) |
280 | { | 279 | { |
@@ -290,7 +289,7 @@ static int dn_forwarding_proc(ctl_table *table, int write, | |||
290 | dn_db = dev->dn_ptr; | 289 | dn_db = dev->dn_ptr; |
291 | old = dn_db->parms.forwarding; | 290 | old = dn_db->parms.forwarding; |
292 | 291 | ||
293 | err = proc_dointvec(table, write, filep, buffer, lenp, ppos); | 292 | err = proc_dointvec(table, write, buffer, lenp, ppos); |
294 | 293 | ||
295 | if ((err >= 0) && write) { | 294 | if ((err >= 0) && write) { |
296 | if (dn_db->parms.forwarding < 0) | 295 | if (dn_db->parms.forwarding < 0) |
diff --git a/net/decnet/sysctl_net_decnet.c b/net/decnet/sysctl_net_decnet.c index 5bcd592ae6d..26b0ab1e9f5 100644 --- a/net/decnet/sysctl_net_decnet.c +++ b/net/decnet/sysctl_net_decnet.c | |||
@@ -165,7 +165,6 @@ static int dn_node_address_strategy(ctl_table *table, | |||
165 | } | 165 | } |
166 | 166 | ||
167 | static int dn_node_address_handler(ctl_table *table, int write, | 167 | static int dn_node_address_handler(ctl_table *table, int write, |
168 | struct file *filp, | ||
169 | void __user *buffer, | 168 | void __user *buffer, |
170 | size_t *lenp, loff_t *ppos) | 169 | size_t *lenp, loff_t *ppos) |
171 | { | 170 | { |
@@ -276,7 +275,6 @@ static int dn_def_dev_strategy(ctl_table *table, | |||
276 | 275 | ||
277 | 276 | ||
278 | static int dn_def_dev_handler(ctl_table *table, int write, | 277 | static int dn_def_dev_handler(ctl_table *table, int write, |
279 | struct file * filp, | ||
280 | void __user *buffer, | 278 | void __user *buffer, |
281 | size_t *lenp, loff_t *ppos) | 279 | size_t *lenp, loff_t *ppos) |
282 | { | 280 | { |
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 07336c6201f..e92f1fd28aa 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -1270,10 +1270,10 @@ static void inet_forward_change(struct net *net) | |||
1270 | } | 1270 | } |
1271 | 1271 | ||
1272 | static int devinet_conf_proc(ctl_table *ctl, int write, | 1272 | static int devinet_conf_proc(ctl_table *ctl, int write, |
1273 | struct file *filp, void __user *buffer, | 1273 | void __user *buffer, |
1274 | size_t *lenp, loff_t *ppos) | 1274 | size_t *lenp, loff_t *ppos) |
1275 | { | 1275 | { |
1276 | int ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); | 1276 | int ret = proc_dointvec(ctl, write, buffer, lenp, ppos); |
1277 | 1277 | ||
1278 | if (write) { | 1278 | if (write) { |
1279 | struct ipv4_devconf *cnf = ctl->extra1; | 1279 | struct ipv4_devconf *cnf = ctl->extra1; |
@@ -1342,12 +1342,12 @@ static int devinet_conf_sysctl(ctl_table *table, | |||
1342 | } | 1342 | } |
1343 | 1343 | ||
1344 | static int devinet_sysctl_forward(ctl_table *ctl, int write, | 1344 | static int devinet_sysctl_forward(ctl_table *ctl, int write, |
1345 | struct file *filp, void __user *buffer, | 1345 | void __user *buffer, |
1346 | size_t *lenp, loff_t *ppos) | 1346 | size_t *lenp, loff_t *ppos) |
1347 | { | 1347 | { |
1348 | int *valp = ctl->data; | 1348 | int *valp = ctl->data; |
1349 | int val = *valp; | 1349 | int val = *valp; |
1350 | int ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); | 1350 | int ret = proc_dointvec(ctl, write, buffer, lenp, ppos); |
1351 | 1351 | ||
1352 | if (write && *valp != val) { | 1352 | if (write && *valp != val) { |
1353 | struct net *net = ctl->extra2; | 1353 | struct net *net = ctl->extra2; |
@@ -1372,12 +1372,12 @@ static int devinet_sysctl_forward(ctl_table *ctl, int write, | |||
1372 | } | 1372 | } |
1373 | 1373 | ||
1374 | int ipv4_doint_and_flush(ctl_table *ctl, int write, | 1374 | int ipv4_doint_and_flush(ctl_table *ctl, int write, |
1375 | struct file *filp, void __user *buffer, | 1375 | void __user *buffer, |
1376 | size_t *lenp, loff_t *ppos) | 1376 | size_t *lenp, loff_t *ppos) |
1377 | { | 1377 | { |
1378 | int *valp = ctl->data; | 1378 | int *valp = ctl->data; |
1379 | int val = *valp; | 1379 | int val = *valp; |
1380 | int ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); | 1380 | int ret = proc_dointvec(ctl, write, buffer, lenp, ppos); |
1381 | struct net *net = ctl->extra2; | 1381 | struct net *net = ctl->extra2; |
1382 | 1382 | ||
1383 | if (write && *valp != val) | 1383 | if (write && *valp != val) |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index df934731453..bb419925202 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -3036,7 +3036,7 @@ void ip_rt_multicast_event(struct in_device *in_dev) | |||
3036 | 3036 | ||
3037 | #ifdef CONFIG_SYSCTL | 3037 | #ifdef CONFIG_SYSCTL |
3038 | static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write, | 3038 | static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write, |
3039 | struct file *filp, void __user *buffer, | 3039 | void __user *buffer, |
3040 | size_t *lenp, loff_t *ppos) | 3040 | size_t *lenp, loff_t *ppos) |
3041 | { | 3041 | { |
3042 | if (write) { | 3042 | if (write) { |
@@ -3046,7 +3046,7 @@ static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write, | |||
3046 | 3046 | ||
3047 | memcpy(&ctl, __ctl, sizeof(ctl)); | 3047 | memcpy(&ctl, __ctl, sizeof(ctl)); |
3048 | ctl.data = &flush_delay; | 3048 | ctl.data = &flush_delay; |
3049 | proc_dointvec(&ctl, write, filp, buffer, lenp, ppos); | 3049 | proc_dointvec(&ctl, write, buffer, lenp, ppos); |
3050 | 3050 | ||
3051 | net = (struct net *)__ctl->extra1; | 3051 | net = (struct net *)__ctl->extra1; |
3052 | rt_cache_flush(net, flush_delay); | 3052 | rt_cache_flush(net, flush_delay); |
@@ -3106,12 +3106,11 @@ static void rt_secret_reschedule(int old) | |||
3106 | } | 3106 | } |
3107 | 3107 | ||
3108 | static int ipv4_sysctl_rt_secret_interval(ctl_table *ctl, int write, | 3108 | static int ipv4_sysctl_rt_secret_interval(ctl_table *ctl, int write, |
3109 | struct file *filp, | ||
3110 | void __user *buffer, size_t *lenp, | 3109 | void __user *buffer, size_t *lenp, |
3111 | loff_t *ppos) | 3110 | loff_t *ppos) |
3112 | { | 3111 | { |
3113 | int old = ip_rt_secret_interval; | 3112 | int old = ip_rt_secret_interval; |
3114 | int ret = proc_dointvec_jiffies(ctl, write, filp, buffer, lenp, ppos); | 3113 | int ret = proc_dointvec_jiffies(ctl, write, buffer, lenp, ppos); |
3115 | 3114 | ||
3116 | rt_secret_reschedule(old); | 3115 | rt_secret_reschedule(old); |
3117 | 3116 | ||
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 4710d219f06..2dcf04d9b00 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c | |||
@@ -36,7 +36,7 @@ static void set_local_port_range(int range[2]) | |||
36 | } | 36 | } |
37 | 37 | ||
38 | /* Validate changes from /proc interface. */ | 38 | /* Validate changes from /proc interface. */ |
39 | static int ipv4_local_port_range(ctl_table *table, int write, struct file *filp, | 39 | static int ipv4_local_port_range(ctl_table *table, int write, |
40 | void __user *buffer, | 40 | void __user *buffer, |
41 | size_t *lenp, loff_t *ppos) | 41 | size_t *lenp, loff_t *ppos) |
42 | { | 42 | { |
@@ -51,7 +51,7 @@ static int ipv4_local_port_range(ctl_table *table, int write, struct file *filp, | |||
51 | }; | 51 | }; |
52 | 52 | ||
53 | inet_get_local_port_range(range, range + 1); | 53 | inet_get_local_port_range(range, range + 1); |
54 | ret = proc_dointvec_minmax(&tmp, write, filp, buffer, lenp, ppos); | 54 | ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); |
55 | 55 | ||
56 | if (write && ret == 0) { | 56 | if (write && ret == 0) { |
57 | if (range[1] < range[0]) | 57 | if (range[1] < range[0]) |
@@ -91,7 +91,7 @@ static int ipv4_sysctl_local_port_range(ctl_table *table, | |||
91 | } | 91 | } |
92 | 92 | ||
93 | 93 | ||
94 | static int proc_tcp_congestion_control(ctl_table *ctl, int write, struct file * filp, | 94 | static int proc_tcp_congestion_control(ctl_table *ctl, int write, |
95 | void __user *buffer, size_t *lenp, loff_t *ppos) | 95 | void __user *buffer, size_t *lenp, loff_t *ppos) |
96 | { | 96 | { |
97 | char val[TCP_CA_NAME_MAX]; | 97 | char val[TCP_CA_NAME_MAX]; |
@@ -103,7 +103,7 @@ static int proc_tcp_congestion_control(ctl_table *ctl, int write, struct file * | |||
103 | 103 | ||
104 | tcp_get_default_congestion_control(val); | 104 | tcp_get_default_congestion_control(val); |
105 | 105 | ||
106 | ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos); | 106 | ret = proc_dostring(&tbl, write, buffer, lenp, ppos); |
107 | if (write && ret == 0) | 107 | if (write && ret == 0) |
108 | ret = tcp_set_default_congestion_control(val); | 108 | ret = tcp_set_default_congestion_control(val); |
109 | return ret; | 109 | return ret; |
@@ -129,7 +129,7 @@ static int sysctl_tcp_congestion_control(ctl_table *table, | |||
129 | } | 129 | } |
130 | 130 | ||
131 | static int proc_tcp_available_congestion_control(ctl_table *ctl, | 131 | static int proc_tcp_available_congestion_control(ctl_table *ctl, |
132 | int write, struct file * filp, | 132 | int write, |
133 | void __user *buffer, size_t *lenp, | 133 | void __user *buffer, size_t *lenp, |
134 | loff_t *ppos) | 134 | loff_t *ppos) |
135 | { | 135 | { |
@@ -140,13 +140,13 @@ static int proc_tcp_available_congestion_control(ctl_table *ctl, | |||
140 | if (!tbl.data) | 140 | if (!tbl.data) |
141 | return -ENOMEM; | 141 | return -ENOMEM; |
142 | tcp_get_available_congestion_control(tbl.data, TCP_CA_BUF_MAX); | 142 | tcp_get_available_congestion_control(tbl.data, TCP_CA_BUF_MAX); |
143 | ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos); | 143 | ret = proc_dostring(&tbl, write, buffer, lenp, ppos); |
144 | kfree(tbl.data); | 144 | kfree(tbl.data); |
145 | return ret; | 145 | return ret; |
146 | } | 146 | } |
147 | 147 | ||
148 | static int proc_allowed_congestion_control(ctl_table *ctl, | 148 | static int proc_allowed_congestion_control(ctl_table *ctl, |
149 | int write, struct file * filp, | 149 | int write, |
150 | void __user *buffer, size_t *lenp, | 150 | void __user *buffer, size_t *lenp, |
151 | loff_t *ppos) | 151 | loff_t *ppos) |
152 | { | 152 | { |
@@ -158,7 +158,7 @@ static int proc_allowed_congestion_control(ctl_table *ctl, | |||
158 | return -ENOMEM; | 158 | return -ENOMEM; |
159 | 159 | ||
160 | tcp_get_allowed_congestion_control(tbl.data, tbl.maxlen); | 160 | tcp_get_allowed_congestion_control(tbl.data, tbl.maxlen); |
161 | ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos); | 161 | ret = proc_dostring(&tbl, write, buffer, lenp, ppos); |
162 | if (write && ret == 0) | 162 | if (write && ret == 0) |
163 | ret = tcp_set_allowed_congestion_control(tbl.data); | 163 | ret = tcp_set_allowed_congestion_control(tbl.data); |
164 | kfree(tbl.data); | 164 | kfree(tbl.data); |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 55f486d89c8..1fd0a3d775d 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -3986,14 +3986,14 @@ static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp) | |||
3986 | #ifdef CONFIG_SYSCTL | 3986 | #ifdef CONFIG_SYSCTL |
3987 | 3987 | ||
3988 | static | 3988 | static |
3989 | int addrconf_sysctl_forward(ctl_table *ctl, int write, struct file * filp, | 3989 | int addrconf_sysctl_forward(ctl_table *ctl, int write, |
3990 | void __user *buffer, size_t *lenp, loff_t *ppos) | 3990 | void __user *buffer, size_t *lenp, loff_t *ppos) |
3991 | { | 3991 | { |
3992 | int *valp = ctl->data; | 3992 | int *valp = ctl->data; |
3993 | int val = *valp; | 3993 | int val = *valp; |
3994 | int ret; | 3994 | int ret; |
3995 | 3995 | ||
3996 | ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); | 3996 | ret = proc_dointvec(ctl, write, buffer, lenp, ppos); |
3997 | 3997 | ||
3998 | if (write) | 3998 | if (write) |
3999 | ret = addrconf_fixup_forwarding(ctl, valp, val); | 3999 | ret = addrconf_fixup_forwarding(ctl, valp, val); |
@@ -4090,14 +4090,14 @@ static int addrconf_disable_ipv6(struct ctl_table *table, int *p, int old) | |||
4090 | } | 4090 | } |
4091 | 4091 | ||
4092 | static | 4092 | static |
4093 | int addrconf_sysctl_disable(ctl_table *ctl, int write, struct file * filp, | 4093 | int addrconf_sysctl_disable(ctl_table *ctl, int write, |
4094 | void __user *buffer, size_t *lenp, loff_t *ppos) | 4094 | void __user *buffer, size_t *lenp, loff_t *ppos) |
4095 | { | 4095 | { |
4096 | int *valp = ctl->data; | 4096 | int *valp = ctl->data; |
4097 | int val = *valp; | 4097 | int val = *valp; |
4098 | int ret; | 4098 | int ret; |
4099 | 4099 | ||
4100 | ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); | 4100 | ret = proc_dointvec(ctl, write, buffer, lenp, ppos); |
4101 | 4101 | ||
4102 | if (write) | 4102 | if (write) |
4103 | ret = addrconf_disable_ipv6(ctl, valp, val); | 4103 | ret = addrconf_disable_ipv6(ctl, valp, val); |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 7015478797f..498b9b0b0fa 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -1735,7 +1735,7 @@ static void ndisc_warn_deprecated_sysctl(struct ctl_table *ctl, | |||
1735 | } | 1735 | } |
1736 | } | 1736 | } |
1737 | 1737 | ||
1738 | int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * filp, void __user *buffer, size_t *lenp, loff_t *ppos) | 1738 | int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos) |
1739 | { | 1739 | { |
1740 | struct net_device *dev = ctl->extra1; | 1740 | struct net_device *dev = ctl->extra1; |
1741 | struct inet6_dev *idev; | 1741 | struct inet6_dev *idev; |
@@ -1746,16 +1746,16 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * f | |||
1746 | ndisc_warn_deprecated_sysctl(ctl, "syscall", dev ? dev->name : "default"); | 1746 | ndisc_warn_deprecated_sysctl(ctl, "syscall", dev ? dev->name : "default"); |
1747 | 1747 | ||
1748 | if (strcmp(ctl->procname, "retrans_time") == 0) | 1748 | if (strcmp(ctl->procname, "retrans_time") == 0) |
1749 | ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); | 1749 | ret = proc_dointvec(ctl, write, buffer, lenp, ppos); |
1750 | 1750 | ||
1751 | else if (strcmp(ctl->procname, "base_reachable_time") == 0) | 1751 | else if (strcmp(ctl->procname, "base_reachable_time") == 0) |
1752 | ret = proc_dointvec_jiffies(ctl, write, | 1752 | ret = proc_dointvec_jiffies(ctl, write, |
1753 | filp, buffer, lenp, ppos); | 1753 | buffer, lenp, ppos); |
1754 | 1754 | ||
1755 | else if ((strcmp(ctl->procname, "retrans_time_ms") == 0) || | 1755 | else if ((strcmp(ctl->procname, "retrans_time_ms") == 0) || |
1756 | (strcmp(ctl->procname, "base_reachable_time_ms") == 0)) | 1756 | (strcmp(ctl->procname, "base_reachable_time_ms") == 0)) |
1757 | ret = proc_dointvec_ms_jiffies(ctl, write, | 1757 | ret = proc_dointvec_ms_jiffies(ctl, write, |
1758 | filp, buffer, lenp, ppos); | 1758 | buffer, lenp, ppos); |
1759 | else | 1759 | else |
1760 | ret = -1; | 1760 | ret = -1; |
1761 | 1761 | ||
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 77aecbe8ff6..d6fe7646a8f 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -2524,13 +2524,13 @@ static const struct file_operations rt6_stats_seq_fops = { | |||
2524 | #ifdef CONFIG_SYSCTL | 2524 | #ifdef CONFIG_SYSCTL |
2525 | 2525 | ||
2526 | static | 2526 | static |
2527 | int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, struct file * filp, | 2527 | int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, |
2528 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2528 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2529 | { | 2529 | { |
2530 | struct net *net = current->nsproxy->net_ns; | 2530 | struct net *net = current->nsproxy->net_ns; |
2531 | int delay = net->ipv6.sysctl.flush_delay; | 2531 | int delay = net->ipv6.sysctl.flush_delay; |
2532 | if (write) { | 2532 | if (write) { |
2533 | proc_dointvec(ctl, write, filp, buffer, lenp, ppos); | 2533 | proc_dointvec(ctl, write, buffer, lenp, ppos); |
2534 | fib6_run_gc(delay <= 0 ? ~0UL : (unsigned long)delay, net); | 2534 | fib6_run_gc(delay <= 0 ? ~0UL : (unsigned long)delay, net); |
2535 | return 0; | 2535 | return 0; |
2536 | } else | 2536 | } else |
diff --git a/net/irda/irsysctl.c b/net/irda/irsysctl.c index 57f8817c397..5c86567e5a7 100644 --- a/net/irda/irsysctl.c +++ b/net/irda/irsysctl.c | |||
@@ -73,12 +73,12 @@ static int min_lap_keepalive_time = 100; /* 100us */ | |||
73 | /* For other sysctl, I've no idea of the range. Maybe Dag could help | 73 | /* For other sysctl, I've no idea of the range. Maybe Dag could help |
74 | * us on that - Jean II */ | 74 | * us on that - Jean II */ |
75 | 75 | ||
76 | static int do_devname(ctl_table *table, int write, struct file *filp, | 76 | static int do_devname(ctl_table *table, int write, |
77 | void __user *buffer, size_t *lenp, loff_t *ppos) | 77 | void __user *buffer, size_t *lenp, loff_t *ppos) |
78 | { | 78 | { |
79 | int ret; | 79 | int ret; |
80 | 80 | ||
81 | ret = proc_dostring(table, write, filp, buffer, lenp, ppos); | 81 | ret = proc_dostring(table, write, buffer, lenp, ppos); |
82 | if (ret == 0 && write) { | 82 | if (ret == 0 && write) { |
83 | struct ias_value *val; | 83 | struct ias_value *val; |
84 | 84 | ||
@@ -90,12 +90,12 @@ static int do_devname(ctl_table *table, int write, struct file *filp, | |||
90 | } | 90 | } |
91 | 91 | ||
92 | 92 | ||
93 | static int do_discovery(ctl_table *table, int write, struct file *filp, | 93 | static int do_discovery(ctl_table *table, int write, |
94 | void __user *buffer, size_t *lenp, loff_t *ppos) | 94 | void __user *buffer, size_t *lenp, loff_t *ppos) |
95 | { | 95 | { |
96 | int ret; | 96 | int ret; |
97 | 97 | ||
98 | ret = proc_dointvec(table, write, filp, buffer, lenp, ppos); | 98 | ret = proc_dointvec(table, write, buffer, lenp, ppos); |
99 | if (ret) | 99 | if (ret) |
100 | return ret; | 100 | return ret; |
101 | 101 | ||
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index fba2892b99e..446e9bd4b4b 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
@@ -1496,14 +1496,14 @@ static int ip_vs_zero_all(void) | |||
1496 | 1496 | ||
1497 | 1497 | ||
1498 | static int | 1498 | static int |
1499 | proc_do_defense_mode(ctl_table *table, int write, struct file * filp, | 1499 | proc_do_defense_mode(ctl_table *table, int write, |
1500 | void __user *buffer, size_t *lenp, loff_t *ppos) | 1500 | void __user *buffer, size_t *lenp, loff_t *ppos) |
1501 | { | 1501 | { |
1502 | int *valp = table->data; | 1502 | int *valp = table->data; |
1503 | int val = *valp; | 1503 | int val = *valp; |
1504 | int rc; | 1504 | int rc; |
1505 | 1505 | ||
1506 | rc = proc_dointvec(table, write, filp, buffer, lenp, ppos); | 1506 | rc = proc_dointvec(table, write, buffer, lenp, ppos); |
1507 | if (write && (*valp != val)) { | 1507 | if (write && (*valp != val)) { |
1508 | if ((*valp < 0) || (*valp > 3)) { | 1508 | if ((*valp < 0) || (*valp > 3)) { |
1509 | /* Restore the correct value */ | 1509 | /* Restore the correct value */ |
@@ -1517,7 +1517,7 @@ proc_do_defense_mode(ctl_table *table, int write, struct file * filp, | |||
1517 | 1517 | ||
1518 | 1518 | ||
1519 | static int | 1519 | static int |
1520 | proc_do_sync_threshold(ctl_table *table, int write, struct file *filp, | 1520 | proc_do_sync_threshold(ctl_table *table, int write, |
1521 | void __user *buffer, size_t *lenp, loff_t *ppos) | 1521 | void __user *buffer, size_t *lenp, loff_t *ppos) |
1522 | { | 1522 | { |
1523 | int *valp = table->data; | 1523 | int *valp = table->data; |
@@ -1527,7 +1527,7 @@ proc_do_sync_threshold(ctl_table *table, int write, struct file *filp, | |||
1527 | /* backup the value first */ | 1527 | /* backup the value first */ |
1528 | memcpy(val, valp, sizeof(val)); | 1528 | memcpy(val, valp, sizeof(val)); |
1529 | 1529 | ||
1530 | rc = proc_dointvec(table, write, filp, buffer, lenp, ppos); | 1530 | rc = proc_dointvec(table, write, buffer, lenp, ppos); |
1531 | if (write && (valp[0] < 0 || valp[1] < 0 || valp[0] >= valp[1])) { | 1531 | if (write && (valp[0] < 0 || valp[1] < 0 || valp[0] >= valp[1])) { |
1532 | /* Restore the correct value */ | 1532 | /* Restore the correct value */ |
1533 | memcpy(valp, val, sizeof(val)); | 1533 | memcpy(valp, val, sizeof(val)); |
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c index 4e620305f28..c93494fef8e 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c | |||
@@ -226,7 +226,7 @@ static char nf_log_sysctl_fnames[NFPROTO_NUMPROTO-NFPROTO_UNSPEC][3]; | |||
226 | static struct ctl_table nf_log_sysctl_table[NFPROTO_NUMPROTO+1]; | 226 | static struct ctl_table nf_log_sysctl_table[NFPROTO_NUMPROTO+1]; |
227 | static struct ctl_table_header *nf_log_dir_header; | 227 | static struct ctl_table_header *nf_log_dir_header; |
228 | 228 | ||
229 | static int nf_log_proc_dostring(ctl_table *table, int write, struct file *filp, | 229 | static int nf_log_proc_dostring(ctl_table *table, int write, |
230 | void __user *buffer, size_t *lenp, loff_t *ppos) | 230 | void __user *buffer, size_t *lenp, loff_t *ppos) |
231 | { | 231 | { |
232 | const struct nf_logger *logger; | 232 | const struct nf_logger *logger; |
@@ -260,7 +260,7 @@ static int nf_log_proc_dostring(ctl_table *table, int write, struct file *filp, | |||
260 | table->data = "NONE"; | 260 | table->data = "NONE"; |
261 | else | 261 | else |
262 | table->data = logger->name; | 262 | table->data = logger->name; |
263 | r = proc_dostring(table, write, filp, buffer, lenp, ppos); | 263 | r = proc_dostring(table, write, buffer, lenp, ppos); |
264 | mutex_unlock(&nf_log_mutex); | 264 | mutex_unlock(&nf_log_mutex); |
265 | } | 265 | } |
266 | 266 | ||
diff --git a/net/phonet/sysctl.c b/net/phonet/sysctl.c index 7b5749ee276..2220f332232 100644 --- a/net/phonet/sysctl.c +++ b/net/phonet/sysctl.c | |||
@@ -56,7 +56,7 @@ void phonet_get_local_port_range(int *min, int *max) | |||
56 | } while (read_seqretry(&local_port_range_lock, seq)); | 56 | } while (read_seqretry(&local_port_range_lock, seq)); |
57 | } | 57 | } |
58 | 58 | ||
59 | static int proc_local_port_range(ctl_table *table, int write, struct file *filp, | 59 | static int proc_local_port_range(ctl_table *table, int write, |
60 | void __user *buffer, | 60 | void __user *buffer, |
61 | size_t *lenp, loff_t *ppos) | 61 | size_t *lenp, loff_t *ppos) |
62 | { | 62 | { |
@@ -70,7 +70,7 @@ static int proc_local_port_range(ctl_table *table, int write, struct file *filp, | |||
70 | .extra2 = &local_port_range_max, | 70 | .extra2 = &local_port_range_max, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | ret = proc_dointvec_minmax(&tmp, write, filp, buffer, lenp, ppos); | 73 | ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); |
74 | 74 | ||
75 | if (write && ret == 0) { | 75 | if (write && ret == 0) { |
76 | if (range[1] < range[0]) | 76 | if (range[1] < range[0]) |
diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c index 5231f7aaac0..42f9748ae09 100644 --- a/net/sunrpc/sysctl.c +++ b/net/sunrpc/sysctl.c | |||
@@ -56,7 +56,7 @@ rpc_unregister_sysctl(void) | |||
56 | } | 56 | } |
57 | } | 57 | } |
58 | 58 | ||
59 | static int proc_do_xprt(ctl_table *table, int write, struct file *file, | 59 | static int proc_do_xprt(ctl_table *table, int write, |
60 | void __user *buffer, size_t *lenp, loff_t *ppos) | 60 | void __user *buffer, size_t *lenp, loff_t *ppos) |
61 | { | 61 | { |
62 | char tmpbuf[256]; | 62 | char tmpbuf[256]; |
@@ -71,7 +71,7 @@ static int proc_do_xprt(ctl_table *table, int write, struct file *file, | |||
71 | } | 71 | } |
72 | 72 | ||
73 | static int | 73 | static int |
74 | proc_dodebug(ctl_table *table, int write, struct file *file, | 74 | proc_dodebug(ctl_table *table, int write, |
75 | void __user *buffer, size_t *lenp, loff_t *ppos) | 75 | void __user *buffer, size_t *lenp, loff_t *ppos) |
76 | { | 76 | { |
77 | char tmpbuf[20], c, *s; | 77 | char tmpbuf[20], c, *s; |
diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c index 87101177825..35fb68b9c8e 100644 --- a/net/sunrpc/xprtrdma/svc_rdma.c +++ b/net/sunrpc/xprtrdma/svc_rdma.c | |||
@@ -80,7 +80,7 @@ struct kmem_cache *svc_rdma_ctxt_cachep; | |||
80 | * current value. | 80 | * current value. |
81 | */ | 81 | */ |
82 | static int read_reset_stat(ctl_table *table, int write, | 82 | static int read_reset_stat(ctl_table *table, int write, |
83 | struct file *filp, void __user *buffer, size_t *lenp, | 83 | void __user *buffer, size_t *lenp, |
84 | loff_t *ppos) | 84 | loff_t *ppos) |
85 | { | 85 | { |
86 | atomic_t *stat = (atomic_t *)table->data; | 86 | atomic_t *stat = (atomic_t *)table->data; |
diff --git a/security/min_addr.c b/security/min_addr.c index 14cc7b3b8d0..c844eed7915 100644 --- a/security/min_addr.c +++ b/security/min_addr.c | |||
@@ -28,12 +28,12 @@ static void update_mmap_min_addr(void) | |||
28 | * sysctl handler which just sets dac_mmap_min_addr = the new value and then | 28 | * sysctl handler which just sets dac_mmap_min_addr = the new value and then |
29 | * calls update_mmap_min_addr() so non MAP_FIXED hints get rounded properly | 29 | * calls update_mmap_min_addr() so non MAP_FIXED hints get rounded properly |
30 | */ | 30 | */ |
31 | int mmap_min_addr_handler(struct ctl_table *table, int write, struct file *filp, | 31 | int mmap_min_addr_handler(struct ctl_table *table, int write, |
32 | void __user *buffer, size_t *lenp, loff_t *ppos) | 32 | void __user *buffer, size_t *lenp, loff_t *ppos) |
33 | { | 33 | { |
34 | int ret; | 34 | int ret; |
35 | 35 | ||
36 | ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos); | 36 | ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos); |
37 | 37 | ||
38 | update_mmap_min_addr(); | 38 | update_mmap_min_addr(); |
39 | 39 | ||