Skip to content

Commit

Permalink
mm/page_alloc.c: fix wrong initialization when sysctl_min_unmapped_ra…
Browse files Browse the repository at this point in the history
…tio changes

Before resetting min_unmapped_pages, we need to initialize
min_unmapped_pages rather than min_slab_pages.

Fixes: a5f5f91 (mm: convert zone_reclaim to node_reclaim)
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Joonsoo Kim <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Minchan Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
JoonsooKim authored and torvalds committed Aug 10, 2016
1 parent 3b33719 commit 81cbcbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -6854,7 +6854,7 @@ int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *table, int write,
return rc;

for_each_online_pgdat(pgdat)
pgdat->min_slab_pages = 0;
pgdat->min_unmapped_pages = 0;

for_each_zone(zone)
zone->zone_pgdat->min_unmapped_pages += (zone->managed_pages *
Expand Down

0 comments on commit 81cbcbc

Please sign in to comment.