diff options
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index f175d98bd35..fd15163f360 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -96,6 +96,7 @@ extern char core_pattern[]; | |||
96 | extern unsigned int core_pipe_limit; | 96 | extern unsigned int core_pipe_limit; |
97 | extern int pid_max; | 97 | extern int pid_max; |
98 | extern int min_free_kbytes; | 98 | extern int min_free_kbytes; |
99 | extern int min_free_order_shift; | ||
99 | extern int pid_max_min, pid_max_max; | 100 | extern int pid_max_min, pid_max_max; |
100 | extern int sysctl_drop_caches; | 101 | extern int sysctl_drop_caches; |
101 | extern int percpu_pagelist_fraction; | 102 | extern int percpu_pagelist_fraction; |
@@ -1189,6 +1190,13 @@ static struct ctl_table vm_table[] = { | |||
1189 | .extra1 = &zero, | 1190 | .extra1 = &zero, |
1190 | }, | 1191 | }, |
1191 | { | 1192 | { |
1193 | .procname = "min_free_order_shift", | ||
1194 | .data = &min_free_order_shift, | ||
1195 | .maxlen = sizeof(min_free_order_shift), | ||
1196 | .mode = 0644, | ||
1197 | .proc_handler = &proc_dointvec | ||
1198 | }, | ||
1199 | { | ||
1192 | .procname = "percpu_pagelist_fraction", | 1200 | .procname = "percpu_pagelist_fraction", |
1193 | .data = &percpu_pagelist_fraction, | 1201 | .data = &percpu_pagelist_fraction, |
1194 | .maxlen = sizeof(percpu_pagelist_fraction), | 1202 | .maxlen = sizeof(percpu_pagelist_fraction), |
@@ -1590,16 +1598,11 @@ void sysctl_head_get(struct ctl_table_header *head) | |||
1590 | spin_unlock(&sysctl_lock); | 1598 | spin_unlock(&sysctl_lock); |
1591 | } | 1599 | } |
1592 | 1600 | ||
1593 | static void free_head(struct rcu_head *rcu) | ||
1594 | { | ||
1595 | kfree(container_of(rcu, struct ctl_table_header, rcu)); | ||
1596 | } | ||
1597 | |||
1598 | void sysctl_head_put(struct ctl_table_header *head) | 1601 | void sysctl_head_put(struct ctl_table_header *head) |
1599 | { | 1602 | { |
1600 | spin_lock(&sysctl_lock); | 1603 | spin_lock(&sysctl_lock); |
1601 | if (!--head->count) | 1604 | if (!--head->count) |
1602 | call_rcu(&head->rcu, free_head); | 1605 | kfree_rcu(head, rcu); |
1603 | spin_unlock(&sysctl_lock); | 1606 | spin_unlock(&sysctl_lock); |
1604 | } | 1607 | } |
1605 | 1608 | ||
@@ -1971,10 +1974,10 @@ void unregister_sysctl_table(struct ctl_table_header * header) | |||
1971 | start_unregistering(header); | 1974 | start_unregistering(header); |
1972 | if (!--header->parent->count) { | 1975 | if (!--header->parent->count) { |
1973 | WARN_ON(1); | 1976 | WARN_ON(1); |
1974 | call_rcu(&header->parent->rcu, free_head); | 1977 | kfree_rcu(header->parent, rcu); |
1975 | } | 1978 | } |
1976 | if (!--header->count) | 1979 | if (!--header->count) |
1977 | call_rcu(&header->rcu, free_head); | 1980 | kfree_rcu(header, rcu); |
1978 | spin_unlock(&sysctl_lock); | 1981 | spin_unlock(&sysctl_lock); |
1979 | } | 1982 | } |
1980 | 1983 | ||