aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/hugetlb.c12
-rw-r--r--mm/page-writeback.c20
-rw-r--r--mm/page_alloc.c24
-rw-r--r--mm/vmscan.c4
4 files changed, 30 insertions, 30 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 815dbd4a6dcb..6f048fcc749c 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1537,7 +1537,7 @@ static unsigned int cpuset_mems_nr(unsigned int *array)
1537 1537
1538#ifdef CONFIG_SYSCTL 1538#ifdef CONFIG_SYSCTL
1539int hugetlb_sysctl_handler(struct ctl_table *table, int write, 1539int hugetlb_sysctl_handler(struct ctl_table *table, int write,
1540 struct file *file, void __user *buffer, 1540 void __user *buffer,
1541 size_t *length, loff_t *ppos) 1541 size_t *length, loff_t *ppos)
1542{ 1542{
1543 struct hstate *h = &default_hstate; 1543 struct hstate *h = &default_hstate;
@@ -1548,7 +1548,7 @@ int hugetlb_sysctl_handler(struct ctl_table *table, int write,
1548 1548
1549 table->data = &tmp; 1549 table->data = &tmp;
1550 table->maxlen = sizeof(unsigned long); 1550 table->maxlen = sizeof(unsigned long);
1551 proc_doulongvec_minmax(table, write, file, buffer, length, ppos); 1551 proc_doulongvec_minmax(table, write, buffer, length, ppos);
1552 1552
1553 if (write) 1553 if (write)
1554 h->max_huge_pages = set_max_huge_pages(h, tmp); 1554 h->max_huge_pages = set_max_huge_pages(h, tmp);
@@ -1557,10 +1557,10 @@ int hugetlb_sysctl_handler(struct ctl_table *table, int write,
1557} 1557}
1558 1558
1559int hugetlb_treat_movable_handler(struct ctl_table *table, int write, 1559int hugetlb_treat_movable_handler(struct ctl_table *table, int write,
1560 struct file *file, void __user *buffer, 1560 void __user *buffer,
1561 size_t *length, loff_t *ppos) 1561 size_t *length, loff_t *ppos)
1562{ 1562{
1563 proc_dointvec(table, write, file, buffer, length, ppos); 1563 proc_dointvec(table, write, buffer, length, ppos);
1564 if (hugepages_treat_as_movable) 1564 if (hugepages_treat_as_movable)
1565 htlb_alloc_mask = GFP_HIGHUSER_MOVABLE; 1565 htlb_alloc_mask = GFP_HIGHUSER_MOVABLE;
1566 else 1566 else
@@ -1569,7 +1569,7 @@ int hugetlb_treat_movable_handler(struct ctl_table *table, int write,
1569} 1569}
1570 1570
1571int hugetlb_overcommit_handler(struct ctl_table *table, int write, 1571int hugetlb_overcommit_handler(struct ctl_table *table, int write,
1572 struct file *file, void __user *buffer, 1572 void __user *buffer,
1573 size_t *length, loff_t *ppos) 1573 size_t *length, loff_t *ppos)
1574{ 1574{
1575 struct hstate *h = &default_hstate; 1575 struct hstate *h = &default_hstate;
@@ -1580,7 +1580,7 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,
1580 1580
1581 table->data = &tmp; 1581 table->data = &tmp;
1582 table->maxlen = sizeof(unsigned long); 1582 table->maxlen = sizeof(unsigned long);
1583 proc_doulongvec_minmax(table, write, file, buffer, length, ppos); 1583 proc_doulongvec_minmax(table, write, buffer, length, ppos);
1584 1584
1585 if (write) { 1585 if (write) {
1586 spin_lock(&hugetlb_lock); 1586 spin_lock(&hugetlb_lock);
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 5f378dd58802..be197f71b096 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -155,37 +155,37 @@ static void update_completion_period(void)
155} 155}
156 156
157int dirty_background_ratio_handler(struct ctl_table *table, int write, 157int dirty_background_ratio_handler(struct ctl_table *table, int write,
158 struct file *filp, void __user *buffer, size_t *lenp, 158 void __user *buffer, size_t *lenp,
159 loff_t *ppos) 159 loff_t *ppos)
160{ 160{
161 int ret; 161 int ret;
162 162
163 ret = proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos); 163 ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
164 if (ret == 0 && write) 164 if (ret == 0 && write)
165 dirty_background_bytes = 0; 165 dirty_background_bytes = 0;
166 return ret; 166 return ret;
167} 167}
168 168
169int dirty_background_bytes_handler(struct ctl_table *table, int write, 169int dirty_background_bytes_handler(struct ctl_table *table, int write,
170 struct file *filp, void __user *buffer, size_t *lenp, 170 void __user *buffer, size_t *lenp,
171 loff_t *ppos) 171 loff_t *ppos)
172{ 172{
173 int ret; 173 int ret;
174 174
175 ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos); 175 ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
176 if (ret == 0 && write) 176 if (ret == 0 && write)
177 dirty_background_ratio = 0; 177 dirty_background_ratio = 0;
178 return ret; 178 return ret;
179} 179}
180 180
181int dirty_ratio_handler(struct ctl_table *table, int write, 181int dirty_ratio_handler(struct ctl_table *table, int write,
182 struct file *filp, void __user *buffer, size_t *lenp, 182 void __user *buffer, size_t *lenp,
183 loff_t *ppos) 183 loff_t *ppos)
184{ 184{
185 int old_ratio = vm_dirty_ratio; 185 int old_ratio = vm_dirty_ratio;
186 int ret; 186 int ret;
187 187
188 ret = proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos); 188 ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
189 if (ret == 0 && write && vm_dirty_ratio != old_ratio) { 189 if (ret == 0 && write && vm_dirty_ratio != old_ratio) {
190 update_completion_period(); 190 update_completion_period();
191 vm_dirty_bytes = 0; 191 vm_dirty_bytes = 0;
@@ -195,13 +195,13 @@ int dirty_ratio_handler(struct ctl_table *table, int write,
195 195
196 196
197int dirty_bytes_handler(struct ctl_table *table, int write, 197int dirty_bytes_handler(struct ctl_table *table, int write,
198 struct file *filp, void __user *buffer, size_t *lenp, 198 void __user *buffer, size_t *lenp,
199 loff_t *ppos) 199 loff_t *ppos)
200{ 200{
201 unsigned long old_bytes = vm_dirty_bytes; 201 unsigned long old_bytes = vm_dirty_bytes;
202 int ret; 202 int ret;
203 203
204 ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos); 204 ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
205 if (ret == 0 && write && vm_dirty_bytes != old_bytes) { 205 if (ret == 0 && write && vm_dirty_bytes != old_bytes) {
206 update_completion_period(); 206 update_completion_period();
207 vm_dirty_ratio = 0; 207 vm_dirty_ratio = 0;
@@ -686,9 +686,9 @@ static DEFINE_TIMER(laptop_mode_wb_timer, laptop_timer_fn, 0, 0);
686 * sysctl handler for /proc/sys/vm/dirty_writeback_centisecs 686 * sysctl handler for /proc/sys/vm/dirty_writeback_centisecs
687 */ 687 */
688int dirty_writeback_centisecs_handler(ctl_table *table, int write, 688int dirty_writeback_centisecs_handler(ctl_table *table, int write,
689 struct file *file, void __user *buffer, size_t *length, loff_t *ppos) 689 void __user *buffer, size_t *length, loff_t *ppos)
690{ 690{
691 proc_dointvec(table, write, file, buffer, length, ppos); 691 proc_dointvec(table, write, buffer, length, ppos);
692 return 0; 692 return 0;
693} 693}
694 694
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5717f27a0704..88248b3c20bb 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2373,7 +2373,7 @@ early_param("numa_zonelist_order", setup_numa_zonelist_order);
2373 * sysctl handler for numa_zonelist_order 2373 * sysctl handler for numa_zonelist_order
2374 */ 2374 */
2375int numa_zonelist_order_handler(ctl_table *table, int write, 2375int numa_zonelist_order_handler(ctl_table *table, int write,
2376 struct file *file, void __user *buffer, size_t *length, 2376 void __user *buffer, size_t *length,
2377 loff_t *ppos) 2377 loff_t *ppos)
2378{ 2378{
2379 char saved_string[NUMA_ZONELIST_ORDER_LEN]; 2379 char saved_string[NUMA_ZONELIST_ORDER_LEN];
@@ -2382,7 +2382,7 @@ int numa_zonelist_order_handler(ctl_table *table, int write,
2382 if (write) 2382 if (write)
2383 strncpy(saved_string, (char*)table->data, 2383 strncpy(saved_string, (char*)table->data,
2384 NUMA_ZONELIST_ORDER_LEN); 2384 NUMA_ZONELIST_ORDER_LEN);
2385 ret = proc_dostring(table, write, file, buffer, length, ppos); 2385 ret = proc_dostring(table, write, buffer, length, ppos);
2386 if (ret) 2386 if (ret)
2387 return ret; 2387 return ret;
2388 if (write) { 2388 if (write) {
@@ -4706,9 +4706,9 @@ module_init(init_per_zone_wmark_min)
4706 * changes. 4706 * changes.
4707 */ 4707 */
4708int min_free_kbytes_sysctl_handler(ctl_table *table, int write, 4708int min_free_kbytes_sysctl_handler(ctl_table *table, int write,
4709 struct file *file, void __user *buffer, size_t *length, loff_t *ppos) 4709 void __user *buffer, size_t *length, loff_t *ppos)
4710{ 4710{
4711 proc_dointvec(table, write, file, buffer, length, ppos); 4711 proc_dointvec(table, write, buffer, length, ppos);
4712 if (write) 4712 if (write)
4713 setup_per_zone_wmarks(); 4713 setup_per_zone_wmarks();
4714 return 0; 4714 return 0;
@@ -4716,12 +4716,12 @@ int min_free_kbytes_sysctl_handler(ctl_table *table, int write,
4716 4716
4717#ifdef CONFIG_NUMA 4717#ifdef CONFIG_NUMA
4718int sysctl_min_unmapped_ratio_sysctl_handler(ctl_table *table, int write, 4718int sysctl_min_unmapped_ratio_sysctl_handler(ctl_table *table, int write,
4719 struct file *file, void __user *buffer, size_t *length, loff_t *ppos) 4719 void __user *buffer, size_t *length, loff_t *ppos)
4720{ 4720{
4721 struct zone *zone; 4721 struct zone *zone;
4722 int rc; 4722 int rc;
4723 4723
4724 rc = proc_dointvec_minmax(table, write, file, buffer, length, ppos); 4724 rc = proc_dointvec_minmax(table, write, buffer, length, ppos);
4725 if (rc) 4725 if (rc)
4726 return rc; 4726 return rc;
4727 4727
@@ -4732,12 +4732,12 @@ int sysctl_min_unmapped_ratio_sysctl_handler(ctl_table *table, int write,
4732} 4732}
4733 4733
4734int sysctl_min_slab_ratio_sysctl_handler(ctl_table *table, int write, 4734int sysctl_min_slab_ratio_sysctl_handler(ctl_table *table, int write,
4735 struct file *file, void __user *buffer, size_t *length, loff_t *ppos) 4735 void __user *buffer, size_t *length, loff_t *ppos)
4736{ 4736{
4737 struct zone *zone; 4737 struct zone *zone;
4738 int rc; 4738 int rc;
4739 4739
4740 rc = proc_dointvec_minmax(table, write, file, buffer, length, ppos); 4740 rc = proc_dointvec_minmax(table, write, buffer, length, ppos);
4741 if (rc) 4741 if (rc)
4742 return rc; 4742 return rc;
4743 4743
@@ -4758,9 +4758,9 @@ int sysctl_min_slab_ratio_sysctl_handler(ctl_table *table, int write,
4758 * if in function of the boot time zone sizes. 4758 * if in function of the boot time zone sizes.
4759 */ 4759 */
4760int lowmem_reserve_ratio_sysctl_handler(ctl_table *table, int write, 4760int lowmem_reserve_ratio_sysctl_handler(ctl_table *table, int write,
4761 struct file *file, void __user *buffer, size_t *length, loff_t *ppos) 4761 void __user *buffer, size_t *length, loff_t *ppos)
4762{ 4762{
4763 proc_dointvec_minmax(table, write, file, buffer, length, ppos); 4763 proc_dointvec_minmax(table, write, buffer, length, ppos);
4764 setup_per_zone_lowmem_reserve(); 4764 setup_per_zone_lowmem_reserve();
4765 return 0; 4765 return 0;
4766} 4766}
@@ -4772,13 +4772,13 @@ int lowmem_reserve_ratio_sysctl_handler(ctl_table *table, int write,
4772 */ 4772 */
4773 4773
4774int percpu_pagelist_fraction_sysctl_handler(ctl_table *table, int write, 4774int percpu_pagelist_fraction_sysctl_handler(ctl_table *table, int write,
4775 struct file *file, void __user *buffer, size_t *length, loff_t *ppos) 4775 void __user *buffer, size_t *length, loff_t *ppos)
4776{ 4776{
4777 struct zone *zone; 4777 struct zone *zone;
4778 unsigned int cpu; 4778 unsigned int cpu;
4779 int ret; 4779 int ret;
4780 4780
4781 ret = proc_dointvec_minmax(table, write, file, buffer, length, ppos); 4781 ret = proc_dointvec_minmax(table, write, buffer, length, ppos);
4782 if (!write || (ret == -EINVAL)) 4782 if (!write || (ret == -EINVAL))
4783 return ret; 4783 return ret;
4784 for_each_populated_zone(zone) { 4784 for_each_populated_zone(zone) {
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 2423782214ab..f444b7409085 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2844,10 +2844,10 @@ static void scan_all_zones_unevictable_pages(void)
2844unsigned long scan_unevictable_pages; 2844unsigned long scan_unevictable_pages;
2845 2845
2846int scan_unevictable_handler(struct ctl_table *table, int write, 2846int scan_unevictable_handler(struct ctl_table *table, int write,
2847 struct file *file, void __user *buffer, 2847 void __user *buffer,
2848 size_t *length, loff_t *ppos) 2848 size_t *length, loff_t *ppos)
2849{ 2849{
2850 proc_doulongvec_minmax(table, write, file, buffer, length, ppos); 2850 proc_doulongvec_minmax(table, write, buffer, length, ppos);
2851 2851
2852 if (write && *(unsigned long *)table->data) 2852 if (write && *(unsigned long *)table->data)
2853 scan_all_zones_unevictable_pages(); 2853 scan_all_zones_unevictable_pages();