Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343298
b: refs/heads/master
c: 3f7dfe2
h: refs/heads/master
v: v3
  • Loading branch information
Joonsoo Kim authored and Linus Torvalds committed Dec 13, 2012
1 parent 72527b4 commit af8bbbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 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: 2d7a695604556913d9ef1ead47881b804d6c52b4
refs/heads/master: 3f7dfe24b84c0ad698c461fc9c4ba3544bbfcebf
20 changes: 4 additions & 16 deletions trunk/mm/bootmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,15 +575,6 @@ static void * __init alloc_bootmem_bdata(struct bootmem_data *bdata,
return NULL;
}

static void * __init alloc_arch_preferred_bootmem(bootmem_data_t *bdata,
unsigned long size, unsigned long align,
unsigned long goal, unsigned long limit)
{
if (WARN_ON_ONCE(slab_is_available()))
return kzalloc(size, GFP_NOWAIT);
return NULL;
}

static void * __init alloc_bootmem_core(unsigned long size,
unsigned long align,
unsigned long goal,
Expand All @@ -592,9 +583,8 @@ static void * __init alloc_bootmem_core(unsigned long size,
bootmem_data_t *bdata;
void *region;

region = alloc_arch_preferred_bootmem(NULL, size, align, goal, limit);
if (region)
return region;
if (WARN_ON_ONCE(slab_is_available()))
return kzalloc(size, GFP_NOWAIT);

list_for_each_entry(bdata, &bdata_list, list) {
if (goal && bdata->node_low_pfn <= PFN_DOWN(goal))
Expand Down Expand Up @@ -692,11 +682,9 @@ void * __init ___alloc_bootmem_node_nopanic(pg_data_t *pgdat,
{
void *ptr;

if (WARN_ON_ONCE(slab_is_available()))
return kzalloc(size, GFP_NOWAIT);
again:
ptr = alloc_arch_preferred_bootmem(pgdat->bdata, size,
align, goal, limit);
if (ptr)
return ptr;

/* do not panic in alloc_bootmem_bdata() */
if (limit && goal + size > limit)
Expand Down

0 comments on commit af8bbbc

Please sign in to comment.