diff --git a/kernel/sysctl.c b/kernel/sysctl.c index c50885a0d..f616d1de0 100755 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -2820,16 +2820,6 @@ static struct ctl_table kern_table[] = { { } }; -static int proc_swappiness_handler(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, - loff_t *ppos) -{ - if (task_is_booster(current)) - return 0; - - return proc_dointvec_minmax(table, write, buffer, lenp, ppos); -} - static struct ctl_table vm_table[] = { { .procname = "overcommit_memory", @@ -2931,7 +2921,7 @@ static struct ctl_table vm_table[] = { .data = &dirty_expire_interval, .maxlen = sizeof(dirty_expire_interval), .mode = 0644, - .proc_handler = proc_swappiness_handler, + .proc_handler = proc_dointvec_minmax, .extra1 = SYSCTL_ZERO, }, { @@ -2947,7 +2937,7 @@ static struct ctl_table vm_table[] = { .data = &vm_swappiness, .maxlen = sizeof(vm_swappiness), .mode = 0644, - .proc_handler = proc_swappiness_handler, + .proc_handler = proc_dointvec_minmax, .extra1 = SYSCTL_ZERO, .extra2 = SYSCTL_TWO_HUNDRED, }, diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 7afe362b2..43615aaf3 100755 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include "internal.h" @@ -529,9 +528,6 @@ int dirty_background_ratio_handler(struct ctl_table *table, int write, { int ret; - if (task_is_booster(current)) - return 0; - ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); if (ret == 0 && write) dirty_background_bytes = 0; @@ -544,9 +540,6 @@ int dirty_background_bytes_handler(struct ctl_table *table, int write, int ret; unsigned long old_bytes = dirty_background_bytes; - if (task_is_booster(current)) - return 0; - ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos); if (ret == 0 && write) { if (DIV_ROUND_UP(dirty_background_bytes, PAGE_SIZE) > @@ -565,9 +558,6 @@ int dirty_ratio_handler(struct ctl_table *table, int write, void *buffer, int old_ratio = vm_dirty_ratio; int ret; - if (task_is_booster(current)) - return 0; - ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); if (ret == 0 && write && vm_dirty_ratio != old_ratio) { writeback_set_ratelimit(); @@ -582,9 +572,6 @@ int dirty_bytes_handler(struct ctl_table *table, int write, unsigned long old_bytes = vm_dirty_bytes; int ret; - if (task_is_booster(current)) - return 0; - ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos); if (ret == 0 && write && vm_dirty_bytes != old_bytes) { if (DIV_ROUND_UP(vm_dirty_bytes, PAGE_SIZE) > UINT_MAX) { @@ -2030,9 +2017,6 @@ int dirty_writeback_centisecs_handler(struct ctl_table *table, int write, unsigned int old_interval = dirty_writeback_interval; int ret; - if (task_is_booster(current)) - return 0; - ret = proc_dointvec(table, write, buffer, length, ppos); /*