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 /include/linux | |
| 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 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 2 | ||||
| -rw-r--r-- | include/linux/ftrace.h | 4 | ||||
| -rw-r--r-- | include/linux/hugetlb.h | 6 | ||||
| -rw-r--r-- | include/linux/mm.h | 2 | ||||
| -rw-r--r-- | include/linux/mmzone.h | 13 | ||||
| -rw-r--r-- | include/linux/sched.h | 8 | ||||
| -rw-r--r-- | include/linux/security.h | 2 | ||||
| -rw-r--r-- | include/linux/swap.h | 2 | ||||
| -rw-r--r-- | include/linux/sysctl.h | 19 | ||||
| -rw-r--r-- | include/linux/writeback.h | 11 |
10 files changed, 33 insertions, 36 deletions
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, |
