Skip to content

Commit

Permalink
Merge branch 'slab-linus' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/christoph/vm

* 'slab-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/christoph/vm:
  slub page alloc fallback: Enable interrupts for GFP_WAIT.
  • Loading branch information
torvalds committed Mar 19, 2008
2 parents f920bb6 + caeab08 commit d5eee40
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1536,9 +1536,15 @@ static void *__slab_alloc(struct kmem_cache *s,
* That is only possible if certain conditions are met that are being
* checked when a slab is created.
*/
if (!(gfpflags & __GFP_NORETRY) && (s->flags & __PAGE_ALLOC_FALLBACK))
return kmalloc_large(s->objsize, gfpflags);

if (!(gfpflags & __GFP_NORETRY) &&
(s->flags & __PAGE_ALLOC_FALLBACK)) {
if (gfpflags & __GFP_WAIT)
local_irq_enable();
object = kmalloc_large(s->objsize, gfpflags);
if (gfpflags & __GFP_WAIT)
local_irq_disable();
return object;
}
return NULL;
debug:
if (!alloc_debug_processing(s, c->page, object, addr))
Expand Down

0 comments on commit d5eee40

Please sign in to comment.