Slab allocators: remove useless __GFP_NO_GROW flag
[powerpc.git] / mm / slub.c
index 79940e9..a632348 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -97,9 +97,6 @@
  *
  * - Support PAGE_ALLOC_DEBUG. Should be easy to do.
  *
- * - SLAB_DEBUG_INITIAL is not supported but I have never seen a use of
- *   it.
- *
  * - Variable sizing of the per node arrays
  */
 
 
 #endif
 
-/*
- * Flags from the regular SLAB that SLUB does not support:
- */
-#define SLUB_UNIMPLEMENTED (SLAB_DEBUG_INITIAL)
-
 /*
  * Mininum number of partial slabs. These will be left on the partial
  * lists even if they are empty. kmem_cache_shrink may reclaim them.
@@ -810,14 +802,8 @@ static void setup_object(struct kmem_cache *s, struct page *page,
                init_tracking(s, object);
        }
 
-       if (unlikely(s->ctor)) {
-               int mode = SLAB_CTOR_CONSTRUCTOR;
-
-               if (!(s->flags & __GFP_WAIT))
-                       mode |= SLAB_CTOR_ATOMIC;
-
-               s->ctor(object, s, mode);
-       }
+       if (unlikely(s->ctor))
+               s->ctor(object, s, SLAB_CTOR_CONSTRUCTOR);
 }
 
 static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node)
@@ -829,9 +815,6 @@ static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node)
        void *last;
        void *p;
 
-       if (flags & __GFP_NO_GROW)
-               return NULL;
-
        BUG_ON(flags & ~(GFP_DMA | GFP_LEVEL_MASK));
 
        if (flags & __GFP_WAIT)
@@ -1748,8 +1731,6 @@ static int kmem_cache_open(struct kmem_cache *s, gfp_t gfpflags,
        s->flags = flags;
        s->align = align;
 
-       BUG_ON(flags & SLUB_UNIMPLEMENTED);
-
        /*
         * The page->offset field is only 16 bit wide. This is an offset
         * in units of words from the beginning of an object. If the slab