Revert "kernel: sysctl: add init protection to common mm-related nodes"
This reverts commit 7059d8baa3
.
This commit is contained in:
parent
cc43b46500
commit
6f09981af2
2 changed files with 2 additions and 28 deletions
|
@ -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,
|
||||
},
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include <linux/sched/rt.h>
|
||||
#include <linux/sched/signal.h>
|
||||
#include <linux/mm_inline.h>
|
||||
#include <linux/binfmts.h>
|
||||
#include <trace/events/writeback.h>
|
||||
|
||||
#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);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue