Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26411
b: refs/heads/master
c: 46a66ee
h: refs/heads/master
i:
  26409: d6c6e33
  26407: a2d5ae5
v: v3
  • Loading branch information
Mike Kravetz authored and Linus Torvalds committed May 2, 2006
1 parent 147d4b3 commit 5971289
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 2c43630fb0ff3f01c29367248ffa4a851e2c9b34
refs/heads/master: 46a66eecdf7bc12562ecb492297447ed0e1ecf59
9 changes: 6 additions & 3 deletions trunk/mm/sparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ static struct mem_section *sparse_index_alloc(int nid)
unsigned long array_size = SECTIONS_PER_ROOT *
sizeof(struct mem_section);

section = alloc_bootmem_node(NODE_DATA(nid), array_size);
if (system_state == SYSTEM_RUNNING)
section = kmalloc_node(array_size, GFP_KERNEL, nid);
else
section = alloc_bootmem_node(NODE_DATA(nid), array_size);

if (section)
memset(section, 0, array_size);
Expand Down Expand Up @@ -281,9 +284,9 @@ int sparse_add_one_section(struct zone *zone, unsigned long start_pfn,

ret = sparse_init_one_section(ms, section_nr, memmap);

if (ret <= 0)
__kfree_section_memmap(memmap, nr_pages);
out:
pgdat_resize_unlock(pgdat, &flags);
if (ret <= 0)
__kfree_section_memmap(memmap, nr_pages);
return ret;
}

0 comments on commit 5971289

Please sign in to comment.