aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/node.c')
-rw-r--r--drivers/base/node.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c
index 44f427a66117..90aa2a11a933 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -456,7 +456,15 @@ static int link_mem_sections(int nid)
456 if (!present_section_nr(section_nr)) 456 if (!present_section_nr(section_nr))
457 continue; 457 continue;
458 mem_sect = __nr_to_section(section_nr); 458 mem_sect = __nr_to_section(section_nr);
459
460 /* same memblock ? */
461 if (mem_blk)
462 if ((section_nr >= mem_blk->start_section_nr) &&
463 (section_nr <= mem_blk->end_section_nr))
464 continue;
465
459 mem_blk = find_memory_block_hinted(mem_sect, mem_blk); 466 mem_blk = find_memory_block_hinted(mem_sect, mem_blk);
467
460 ret = register_mem_sect_under_node(mem_blk, nid); 468 ret = register_mem_sect_under_node(mem_blk, nid);
461 if (!err) 469 if (!err)
462 err = ret; 470 err = ret;