mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
mm/sl[aou]b: Do slab aliasing call from common code
The slab aliasing logic causes some strange contortions in slub. So add a call to deal with aliases to slab_common.c but disable it for other slab allocators by providng stubs that fail to create aliases. Full general support for aliases will require additional cleanup passes and more standardization of fields in kmem_cache. Signed-off-by: Christoph Lameter <[email protected]> Signed-off-by: Pekka Enberg <[email protected]>
This commit is contained in:
parent
db265eca77
commit
cbb79694d5
3 changed files with 25 additions and 4 deletions
10
mm/slab.h
10
mm/slab.h
|
|
@ -36,6 +36,16 @@ extern struct kmem_cache *kmem_cache;
|
|||
struct kmem_cache *__kmem_cache_create(const char *name, size_t size,
|
||||
size_t align, unsigned long flags, void (*ctor)(void *));
|
||||
|
||||
#ifdef CONFIG_SLUB
|
||||
struct kmem_cache *__kmem_cache_alias(const char *name, size_t size,
|
||||
size_t align, unsigned long flags, void (*ctor)(void *));
|
||||
#else
|
||||
static inline struct kmem_cache *__kmem_cache_alias(const char *name, size_t size,
|
||||
size_t align, unsigned long flags, void (*ctor)(void *))
|
||||
{ return NULL; }
|
||||
#endif
|
||||
|
||||
|
||||
int __kmem_cache_shutdown(struct kmem_cache *);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue