aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.h
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2012-07-06 16:25:12 -0400
committerPekka Enberg <penberg@kernel.org>2012-07-09 05:13:41 -0400
commit18004c5d4084d965aa1396392706b8688306427a (patch)
treeae480cb4514cbddf38ee43ec4513f59cfa42c3d7 /mm/slab.h
parent97d06609158e61f6bdf538c4a6788e2de492236f (diff)
mm, sl[aou]b: Use a common mutex definition
Use the mutex definition from SLAB and make it the common way to take a sleeping lock. This has the effect of using a mutex instead of a rw semaphore for SLUB. SLOB gains the use of a mutex for kmem_cache_create serialization. Not needed now but SLOB may acquire some more features later (like slabinfo / sysfs support) through the expansion of the common code that will need this. Reviewed-by: Glauber Costa <glommer@parallels.com> Reviewed-by: Joonsoo Kim <js1304@gmail.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm/slab.h')
-rw-r--r--mm/slab.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/slab.h b/mm/slab.h
index f9a9815cdc82..db7848caaa25 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -23,6 +23,10 @@ enum slab_state {
23 23
24extern enum slab_state slab_state; 24extern enum slab_state slab_state;
25 25
26/* The slab cache mutex protects the management structures during changes */
27extern struct mutex slab_mutex;
28extern struct list_head slab_caches;
29
26struct kmem_cache *__kmem_cache_create(const char *name, size_t size, 30struct kmem_cache *__kmem_cache_create(const char *name, size_t size,
27 size_t align, unsigned long flags, void (*ctor)(void *)); 31 size_t align, unsigned long flags, void (*ctor)(void *));
28 32