]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
slub page alloc fallback: Enable interrupts for GFP_WAIT.
authorChristoph Lameter <clameter@sgi.com>
Thu, 13 Mar 2008 06:57:49 +0000 (23:57 -0700)
committerChristoph Lameter <clameter@sgi.com>
Mon, 17 Mar 2008 18:14:17 +0000 (11:14 -0700)
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>
mm/slub.c

index 96d63eb3ab179528efd1ea8c64cbc6358212a967..ca71d5b81e4a436b43bb183728650887eef4f0e9 100644 (file)
--- a/mm/slub.c
+++ b/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))