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 /kernel | |
| 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>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/hung_task.c | 4 | ||||
| -rw-r--r-- | kernel/sched.c | 4 | ||||
| -rw-r--r-- | kernel/sched_fair.c | 4 | ||||
| -rw-r--r-- | kernel/slow-work.c | 12 | ||||
| -rw-r--r-- | kernel/softlockup.c | 4 | ||||
| -rw-r--r-- | kernel/sysctl.c | 78 | ||||
| -rw-r--r-- | kernel/trace/ftrace.c | 4 | ||||
| -rw-r--r-- | kernel/trace/trace_stack.c | 4 | ||||
| -rw-r--r-- | kernel/utsname_sysctl.c | 4 |
9 files changed, 53 insertions, 65 deletions
diff --git a/kernel/hung_task.c b/kernel/hung_task.c index 022a4927b785..d4e841747400 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 0d0361b9dbb3..ee61f454a98b 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 ecc637a0d591..4e777b47eeda 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 09d7519557d3..0d31135efbf4 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 88796c330838..81324d12eb35 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 37abb8c3995b..a02697b7cb97 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 23df7771c937..a142579765bf 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 0f6facb050a1..8504ac71e4e8 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 92359cc747a7..69eae358a726 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 | } |
