diff options
author | Minchan Kim <minchan@kernel.org> | 2012-07-31 19:46:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-31 21:42:50 -0400 |
commit | 6527af5d1bea219d64095a5e30c1b1e0868aae16 (patch) | |
tree | 99f36cf0b3744e5d7cdaf52c22a3e9897e17f7bb /mm/page_alloc.c | |
parent | 88fdf75d1bb51d85ba00c466391770056d44bc03 (diff) |
mm: remove redundant initialization
pg_data_t is zeroed before reaching free_area_init_core(), so remove the
now unnecessary initializations.
Signed-off-by: Minchan Kim <minchan@kernel.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a6f7576aecae..889532b8e6c1 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -4377,6 +4377,8 @@ void __init set_pageblock_order(void) | |||
4377 | * - mark all pages reserved | 4377 | * - mark all pages reserved |
4378 | * - mark all memory queues empty | 4378 | * - mark all memory queues empty |
4379 | * - clear the memory bitmaps | 4379 | * - clear the memory bitmaps |
4380 | * | ||
4381 | * NOTE: pgdat should get zeroed by caller. | ||
4380 | */ | 4382 | */ |
4381 | static void __paginginit free_area_init_core(struct pglist_data *pgdat, | 4383 | static void __paginginit free_area_init_core(struct pglist_data *pgdat, |
4382 | unsigned long *zones_size, unsigned long *zholes_size) | 4384 | unsigned long *zones_size, unsigned long *zholes_size) |
@@ -4387,10 +4389,8 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat, | |||
4387 | int ret; | 4389 | int ret; |
4388 | 4390 | ||
4389 | pgdat_resize_init(pgdat); | 4391 | pgdat_resize_init(pgdat); |
4390 | pgdat->nr_zones = 0; | ||
4391 | init_waitqueue_head(&pgdat->kswapd_wait); | 4392 | init_waitqueue_head(&pgdat->kswapd_wait); |
4392 | init_waitqueue_head(&pgdat->pfmemalloc_wait); | 4393 | init_waitqueue_head(&pgdat->pfmemalloc_wait); |
4393 | pgdat->kswapd_max_order = 0; | ||
4394 | pgdat_page_cgroup_init(pgdat); | 4394 | pgdat_page_cgroup_init(pgdat); |
4395 | 4395 | ||
4396 | for (j = 0; j < MAX_NR_ZONES; j++) { | 4396 | for (j = 0; j < MAX_NR_ZONES; j++) { |
@@ -4451,11 +4451,6 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat, | |||
4451 | 4451 | ||
4452 | zone_pcp_init(zone); | 4452 | zone_pcp_init(zone); |
4453 | lruvec_init(&zone->lruvec, zone); | 4453 | lruvec_init(&zone->lruvec, zone); |
4454 | zap_zone_vm_stats(zone); | ||
4455 | zone->flags = 0; | ||
4456 | #ifdef CONFIG_MEMORY_ISOLATION | ||
4457 | zone->nr_pageblock_isolate = 0; | ||
4458 | #endif | ||
4459 | if (!size) | 4454 | if (!size) |
4460 | continue; | 4455 | continue; |
4461 | 4456 | ||