]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'slub/earlyboot' into for-linus
authorPekka Enberg <penberg@cs.helsinki.fi>
Wed, 17 Jun 2009 05:30:54 +0000 (08:30 +0300)
committerPekka Enberg <penberg@cs.helsinki.fi>
Wed, 17 Jun 2009 05:30:54 +0000 (08:30 +0300)
Conflicts:
mm/slub.c

1  2 
mm/slub.c

diff --cc mm/slub.c
index b2b0c78ae35d04b74c0cea458ac93a78ee859e44,dcbfda0b02ed46806754ec40132ddebf5e11855d..4c6449310a0ef387a3307ea1baa6617451e09e84
+++ b/mm/slub.c
@@@ -2725,10 -2632,18 +2726,18 @@@ static noinline struct kmem_cache *dma_
                         (unsigned int)realsize);
        s = kmalloc(kmem_size, flags & ~SLUB_DMA);
  
 -      slabflags = SLAB_CACHE_DMA;
+       /*
+        * Must defer sysfs creation to a workqueue because we don't know
+        * what context we are called from. Before sysfs comes up, we don't
+        * need to do anything because our sysfs initcall will start by
+        * adding all existing slabs to sysfs.
+        */
++      slabflags = SLAB_CACHE_DMA|SLAB_NOTRACK;
+       if (slab_state >= SYSFS)
+               slabflags |= __SYSFS_ADD_DEFERRED;
        if (!s || !text || !kmem_cache_open(s, flags, text,
-                       realsize, ARCH_KMALLOC_MINALIGN,
-                       SLAB_CACHE_DMA|SLAB_NOTRACK|__SYSFS_ADD_DEFERRED,
-                       NULL)) {
+                       realsize, ARCH_KMALLOC_MINALIGN, slabflags, NULL)) {
                kfree(s);
                kfree(text);
                goto unlock_out;