You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
Linus Torvalds
parent
c0d0787b6d
commit
8d65af789f
+6
-6
@@ -1537,7 +1537,7 @@ static unsigned int cpuset_mems_nr(unsigned int *array)
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
int hugetlb_sysctl_handler(struct ctl_table *table, int write,
|
||||
struct file *file, void __user *buffer,
|
||||
void __user *buffer,
|
||||
size_t *length, loff_t *ppos)
|
||||
{
|
||||
struct hstate *h = &default_hstate;
|
||||
@@ -1548,7 +1548,7 @@ int hugetlb_sysctl_handler(struct ctl_table *table, int write,
|
||||
|
||||
table->data = &tmp;
|
||||
table->maxlen = sizeof(unsigned long);
|
||||
proc_doulongvec_minmax(table, write, file, buffer, length, ppos);
|
||||
proc_doulongvec_minmax(table, write, buffer, length, ppos);
|
||||
|
||||
if (write)
|
||||
h->max_huge_pages = set_max_huge_pages(h, tmp);
|
||||
@@ -1557,10 +1557,10 @@ int hugetlb_sysctl_handler(struct ctl_table *table, int write,
|
||||
}
|
||||
|
||||
int hugetlb_treat_movable_handler(struct ctl_table *table, int write,
|
||||
struct file *file, void __user *buffer,
|
||||
void __user *buffer,
|
||||
size_t *length, loff_t *ppos)
|
||||
{
|
||||
proc_dointvec(table, write, file, buffer, length, ppos);
|
||||
proc_dointvec(table, write, buffer, length, ppos);
|
||||
if (hugepages_treat_as_movable)
|
||||
htlb_alloc_mask = GFP_HIGHUSER_MOVABLE;
|
||||
else
|
||||
@@ -1569,7 +1569,7 @@ int hugetlb_treat_movable_handler(struct ctl_table *table, int write,
|
||||
}
|
||||
|
||||
int hugetlb_overcommit_handler(struct ctl_table *table, int write,
|
||||
struct file *file, void __user *buffer,
|
||||
void __user *buffer,
|
||||
size_t *length, loff_t *ppos)
|
||||
{
|
||||
struct hstate *h = &default_hstate;
|
||||
@@ -1580,7 +1580,7 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,
|
||||
|
||||
table->data = &tmp;
|
||||
table->maxlen = sizeof(unsigned long);
|
||||
proc_doulongvec_minmax(table, write, file, buffer, length, ppos);
|
||||
proc_doulongvec_minmax(table, write, buffer, length, ppos);
|
||||
|
||||
if (write) {
|
||||
spin_lock(&hugetlb_lock);
|
||||
|
||||
+10
-10
@@ -155,37 +155,37 @@ static void update_completion_period(void)
|
||||
}
|
||||
|
||||
int dirty_background_ratio_handler(struct ctl_table *table, int write,
|
||||
struct file *filp, void __user *buffer, size_t *lenp,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos);
|
||||
ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
|
||||
if (ret == 0 && write)
|
||||
dirty_background_bytes = 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int dirty_background_bytes_handler(struct ctl_table *table, int write,
|
||||
struct file *filp, void __user *buffer, size_t *lenp,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos);
|
||||
ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
|
||||
if (ret == 0 && write)
|
||||
dirty_background_ratio = 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int dirty_ratio_handler(struct ctl_table *table, int write,
|
||||
struct file *filp, void __user *buffer, size_t *lenp,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos)
|
||||
{
|
||||
int old_ratio = vm_dirty_ratio;
|
||||
int ret;
|
||||
|
||||
ret = proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos);
|
||||
ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
|
||||
if (ret == 0 && write && vm_dirty_ratio != old_ratio) {
|
||||
update_completion_period();
|
||||
vm_dirty_bytes = 0;
|
||||
@@ -195,13 +195,13 @@ int dirty_ratio_handler(struct ctl_table *table, int write,
|
||||
|
||||
|
||||
int dirty_bytes_handler(struct ctl_table *table, int write,
|
||||
struct file *filp, void __user *buffer, size_t *lenp,
|
||||
void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos)
|
||||
{
|
||||
unsigned long old_bytes = vm_dirty_bytes;
|
||||
int ret;
|
||||
|
||||
ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos);
|
||||
ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
|
||||
if (ret == 0 && write && vm_dirty_bytes != old_bytes) {
|
||||
update_completion_period();
|
||||
vm_dirty_ratio = 0;
|
||||
@@ -686,9 +686,9 @@ static DEFINE_TIMER(laptop_mode_wb_timer, laptop_timer_fn, 0, 0);
|
||||
* sysctl handler for /proc/sys/vm/dirty_writeback_centisecs
|
||||
*/
|
||||
int dirty_writeback_centisecs_handler(ctl_table *table, int write,
|
||||
struct file *file, void __user *buffer, size_t *length, loff_t *ppos)
|
||||
void __user *buffer, size_t *length, loff_t *ppos)
|
||||
{
|
||||
proc_dointvec(table, write, file, buffer, length, ppos);
|
||||
proc_dointvec(table, write, buffer, length, ppos);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+12
-12
@@ -2373,7 +2373,7 @@ early_param("numa_zonelist_order", setup_numa_zonelist_order);
|
||||
* sysctl handler for numa_zonelist_order
|
||||
*/
|
||||
int numa_zonelist_order_handler(ctl_table *table, int write,
|
||||
struct file *file, void __user *buffer, size_t *length,
|
||||
void __user *buffer, size_t *length,
|
||||
loff_t *ppos)
|
||||
{
|
||||
char saved_string[NUMA_ZONELIST_ORDER_LEN];
|
||||
@@ -2382,7 +2382,7 @@ int numa_zonelist_order_handler(ctl_table *table, int write,
|
||||
if (write)
|
||||
strncpy(saved_string, (char*)table->data,
|
||||
NUMA_ZONELIST_ORDER_LEN);
|
||||
ret = proc_dostring(table, write, file, buffer, length, ppos);
|
||||
ret = proc_dostring(table, write, buffer, length, ppos);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (write) {
|
||||
@@ -4706,9 +4706,9 @@ module_init(init_per_zone_wmark_min)
|
||||
* changes.
|
||||
*/
|
||||
int min_free_kbytes_sysctl_handler(ctl_table *table, int write,
|
||||
struct file *file, void __user *buffer, size_t *length, loff_t *ppos)
|
||||
void __user *buffer, size_t *length, loff_t *ppos)
|
||||
{
|
||||
proc_dointvec(table, write, file, buffer, length, ppos);
|
||||
proc_dointvec(table, write, buffer, length, ppos);
|
||||
if (write)
|
||||
setup_per_zone_wmarks();
|
||||
return 0;
|
||||
@@ -4716,12 +4716,12 @@ int min_free_kbytes_sysctl_handler(ctl_table *table, int write,
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
int sysctl_min_unmapped_ratio_sysctl_handler(ctl_table *table, int write,
|
||||
struct file *file, void __user *buffer, size_t *length, loff_t *ppos)
|
||||
void __user *buffer, size_t *length, loff_t *ppos)
|
||||
{
|
||||
struct zone *zone;
|
||||
int rc;
|
||||
|
||||
rc = proc_dointvec_minmax(table, write, file, buffer, length, ppos);
|
||||
rc = proc_dointvec_minmax(table, write, buffer, length, ppos);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
@@ -4732,12 +4732,12 @@ int sysctl_min_unmapped_ratio_sysctl_handler(ctl_table *table, int write,
|
||||
}
|
||||
|
||||
int sysctl_min_slab_ratio_sysctl_handler(ctl_table *table, int write,
|
||||
struct file *file, void __user *buffer, size_t *length, loff_t *ppos)
|
||||
void __user *buffer, size_t *length, loff_t *ppos)
|
||||
{
|
||||
struct zone *zone;
|
||||
int rc;
|
||||
|
||||
rc = proc_dointvec_minmax(table, write, file, buffer, length, ppos);
|
||||
rc = proc_dointvec_minmax(table, write, buffer, length, ppos);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
@@ -4758,9 +4758,9 @@ int sysctl_min_slab_ratio_sysctl_handler(ctl_table *table, int write,
|
||||
* if in function of the boot time zone sizes.
|
||||
*/
|
||||
int lowmem_reserve_ratio_sysctl_handler(ctl_table *table, int write,
|
||||
struct file *file, void __user *buffer, size_t *length, loff_t *ppos)
|
||||
void __user *buffer, size_t *length, loff_t *ppos)
|
||||
{
|
||||
proc_dointvec_minmax(table, write, file, buffer, length, ppos);
|
||||
proc_dointvec_minmax(table, write, buffer, length, ppos);
|
||||
setup_per_zone_lowmem_reserve();
|
||||
return 0;
|
||||
}
|
||||
@@ -4772,13 +4772,13 @@ int lowmem_reserve_ratio_sysctl_handler(ctl_table *table, int write,
|
||||
*/
|
||||
|
||||
int percpu_pagelist_fraction_sysctl_handler(ctl_table *table, int write,
|
||||
struct file *file, void __user *buffer, size_t *length, loff_t *ppos)
|
||||
void __user *buffer, size_t *length, loff_t *ppos)
|
||||
{
|
||||
struct zone *zone;
|
||||
unsigned int cpu;
|
||||
int ret;
|
||||
|
||||
ret = proc_dointvec_minmax(table, write, file, buffer, length, ppos);
|
||||
ret = proc_dointvec_minmax(table, write, buffer, length, ppos);
|
||||
if (!write || (ret == -EINVAL))
|
||||
return ret;
|
||||
for_each_populated_zone(zone) {
|
||||
|
||||
+2
-2
@@ -2844,10 +2844,10 @@ static void scan_all_zones_unevictable_pages(void)
|
||||
unsigned long scan_unevictable_pages;
|
||||
|
||||
int scan_unevictable_handler(struct ctl_table *table, int write,
|
||||
struct file *file, void __user *buffer,
|
||||
void __user *buffer,
|
||||
size_t *length, loff_t *ppos)
|
||||
{
|
||||
proc_doulongvec_minmax(table, write, file, buffer, length, ppos);
|
||||
proc_doulongvec_minmax(table, write, buffer, length, ppos);
|
||||
|
||||
if (write && *(unsigned long *)table->data)
|
||||
scan_all_zones_unevictable_pages();
|
||||
|
||||
Reference in New Issue
Block a user