projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mm/sl[aou]b: Use "kmem_cache" name for slab cache with kmem_cache struct
[platform/adaptation/renesas_rcar/renesas_kernel.git]
/
mm
/
slob.c
diff --git
a/mm/slob.c
b/mm/slob.c
index
45d4ca7
..
7d272c3
100644
(file)
--- a/
mm/slob.c
+++ b/
mm/slob.c
@@
-538,14
+538,11
@@
struct kmem_cache *__kmem_cache_create(const char *name, size_t size,
return c;
}
return c;
}
-void kmem_cache_destroy(struct kmem_cache *c)
+void
__
kmem_cache_destroy(struct kmem_cache *c)
{
kmemleak_free(c);
{
kmemleak_free(c);
- if (c->flags & SLAB_DESTROY_BY_RCU)
- rcu_barrier();
slob_free(c, sizeof(struct kmem_cache));
}
slob_free(c, sizeof(struct kmem_cache));
}
-EXPORT_SYMBOL(kmem_cache_destroy);
void *kmem_cache_alloc_node(struct kmem_cache *c, gfp_t flags, int node)
{
void *kmem_cache_alloc_node(struct kmem_cache *c, gfp_t flags, int node)
{
@@
-613,14
+610,28
@@
unsigned int kmem_cache_size(struct kmem_cache *c)
}
EXPORT_SYMBOL(kmem_cache_size);
}
EXPORT_SYMBOL(kmem_cache_size);
+int __kmem_cache_shutdown(struct kmem_cache *c)
+{
+ /* No way to check for remaining objects */
+ return 0;
+}
+
int kmem_cache_shrink(struct kmem_cache *d)
{
return 0;
}
EXPORT_SYMBOL(kmem_cache_shrink);
int kmem_cache_shrink(struct kmem_cache *d)
{
return 0;
}
EXPORT_SYMBOL(kmem_cache_shrink);
+struct kmem_cache kmem_cache_boot = {
+ .name = "kmem_cache",
+ .size = sizeof(struct kmem_cache),
+ .flags = SLAB_PANIC,
+ .align = ARCH_KMALLOC_MINALIGN,
+};
+
void __init kmem_cache_init(void)
{
void __init kmem_cache_init(void)
{
+ kmem_cache = &kmem_cache_boot;
slab_state = UP;
}
slab_state = UP;
}