Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213472
b: refs/heads/master
c: 63d027a
h: refs/heads/master
v: v3
  • Loading branch information
Robin Holt authored and Greg Kroah-Hartman committed Oct 22, 2010
1 parent 2cc1d4d commit 15c035b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 98383031ed77c6eb49ab612166fef9c0efe1604a
refs/heads/master: 63d027a63888e993545d10fdfe4107d543f01bca
8 changes: 5 additions & 3 deletions trunk/drivers/base/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,25 +409,27 @@ static int link_mem_sections(int nid)
unsigned long start_pfn = NODE_DATA(nid)->node_start_pfn;
unsigned long end_pfn = start_pfn + NODE_DATA(nid)->node_spanned_pages;
unsigned long pfn;
struct memory_block *mem_blk = NULL;
int err = 0;

for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
unsigned long section_nr = pfn_to_section_nr(pfn);
struct mem_section *mem_sect;
struct memory_block *mem_blk;
int ret;

if (!present_section_nr(section_nr))
continue;
mem_sect = __nr_to_section(section_nr);
mem_blk = find_memory_block(mem_sect);
mem_blk = find_memory_block_hinted(mem_sect, mem_blk);
ret = register_mem_sect_under_node(mem_blk, nid);
if (!err)
err = ret;

/* discard ref obtained in find_memory_block() */
kobject_put(&mem_blk->sysdev.kobj);
}

if (mem_blk)
kobject_put(&mem_blk->sysdev.kobj);
return err;
}

Expand Down

0 comments on commit 15c035b

Please sign in to comment.