mirror of
https://github.com/adulau/aha.git
synced 2025-01-01 13:46:24 +00:00
Merge branch 'slab-linus' of git://git.kernel.org/pub/scm/linux/kernel/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.
This commit is contained in:
commit
d5eee40572
1 changed files with 9 additions and 3 deletions
12
mm/slub.c
12
mm/slub.c
|
@ -1536,9 +1536,15 @@ new_slab:
|
|||
* 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))
|
||||
|
|
Loading…
Reference in a new issue