mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
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 <[email protected]> Reviewed-by: Joonsoo Kim <[email protected]> Signed-off-by: Christoph Lameter <[email protected]> Signed-off-by: Pekka Enberg <[email protected]>
This commit is contained in:
parent
97d0660915
commit
18004c5d40
4 changed files with 82 additions and 86 deletions
|
|
@ -23,6 +23,10 @@ enum slab_state {
|
|||
|
||||
extern enum slab_state slab_state;
|
||||
|
||||
/* The slab cache mutex protects the management structures during changes */
|
||||
extern struct mutex slab_mutex;
|
||||
extern struct list_head slab_caches;
|
||||
|
||||
struct kmem_cache *__kmem_cache_create(const char *name, size_t size,
|
||||
size_t align, unsigned long flags, void (*ctor)(void *));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue