aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2008-03-13 02:57:49 -0400
committerChristoph Lameter <clameter@sgi.com>2008-03-17 14:14:17 -0400
commitcaeab084deb61cd2d51cb8facc0e894a5b406aa4 (patch)
tree9a5bebe51b0dce51169bf86c6a0fb91d0c929c56 /mm/slub.c
parentbde4f8fa8db2abd5ac9c542d76012d0fedab050f (diff)
slub page alloc fallback: Enable interrupts for GFP_WAIT.
The fallback path needs to enable interrupts like done for the other page allocator calls. This was not necessary with the alternate fast path since we handled irq enable/disable in the slow path. The regular fastpath handles irq enable/disable around calls to the slow path so we need to restore the proper status before calling the page allocator from the slowpath. Signed-off-by: Christoph Lameter <clameter@sgi.com>
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 96d63eb3ab17..ca71d5b81e4a 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1536,9 +1536,15 @@ new_slab:
1536 * That is only possible if certain conditions are met that are being 1536 * That is only possible if certain conditions are met that are being
1537 * checked when a slab is created. 1537 * checked when a slab is created.
1538 */ 1538 */
1539 if (!(gfpflags & __GFP_NORETRY) && (s->flags & __PAGE_ALLOC_FALLBACK)) 1539 if (!(gfpflags & __GFP_NORETRY) &&
1540 return kmalloc_large(s->objsize, gfpflags); 1540 (s->flags & __PAGE_ALLOC_FALLBACK)) {
1541 1541 if (gfpflags & __GFP_WAIT)
1542 local_irq_enable();
1543 object = kmalloc_large(s->objsize, gfpflags);
1544 if (gfpflags & __GFP_WAIT)
1545 local_irq_disable();
1546 return object;
1547 }
1542 return NULL; 1548 return NULL;
1543debug: 1549debug:
1544 if (!alloc_debug_processing(s, c->page, object, addr)) 1550 if (!alloc_debug_processing(s, c->page, object, addr))