Commit 139c2d75 authored by Xishi Qiu's avatar Xishi Qiu Committed by Linus Torvalds

mm: use zone_is_initialized() instead of if(zone->wait_table)

Use "zone_is_initialized()" instead of "if (zone->wait_table)".
Simplify the code, no functional change.
Signed-off-by: default avatarXishi Qiu <qiuxishi@huawei.com>
Cc: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8080fc03
...@@ -194,7 +194,7 @@ void register_page_bootmem_info_node(struct pglist_data *pgdat) ...@@ -194,7 +194,7 @@ void register_page_bootmem_info_node(struct pglist_data *pgdat)
zone = &pgdat->node_zones[0]; zone = &pgdat->node_zones[0];
for (; zone < pgdat->node_zones + MAX_NR_ZONES - 1; zone++) { for (; zone < pgdat->node_zones + MAX_NR_ZONES - 1; zone++) {
if (zone->wait_table) { if (zone_is_initialized(zone)) {
nr_pages = zone->wait_table_hash_nr_entries nr_pages = zone->wait_table_hash_nr_entries
* sizeof(wait_queue_head_t); * sizeof(wait_queue_head_t);
nr_pages = PAGE_ALIGN(nr_pages) >> PAGE_SHIFT; nr_pages = PAGE_ALIGN(nr_pages) >> PAGE_SHIFT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment