Skip to content

Commit 139c2d7

Browse files
Xishi Qiutorvalds
authored andcommitted
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: Xishi Qiu <qiuxishi@huawei.com> Cc: Cody P Schafer <cody@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 8080fc0 commit 139c2d7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎mm/memory_hotplug.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ void register_page_bootmem_info_node(struct pglist_data *pgdat)
194194

195195
zone = &pgdat->node_zones[0];
196196
for (; zone < pgdat->node_zones + MAX_NR_ZONES - 1; zone++) {
197-
if (zone->wait_table) {
197+
if (zone_is_initialized(zone)) {
198198
nr_pages = zone->wait_table_hash_nr_entries
199199
* sizeof(wait_queue_head_t);
200200
nr_pages = PAGE_ALIGN(nr_pages) >> PAGE_SHIFT;

0 commit comments

Comments
 (0)