aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/slab.h1
-rw-r--r--mm/slab.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 7d66385ae750..76cf7e60216c 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -64,6 +64,7 @@ extern int kmem_cache_shrink(kmem_cache_t *);
64extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast); 64extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast);
65extern void kmem_cache_free(kmem_cache_t *, void *); 65extern void kmem_cache_free(kmem_cache_t *, void *);
66extern unsigned int kmem_cache_size(kmem_cache_t *); 66extern unsigned int kmem_cache_size(kmem_cache_t *);
67extern const char *kmem_cache_name(kmem_cache_t *);
67extern kmem_cache_t *kmem_find_general_cachep(size_t size, int gfpflags); 68extern kmem_cache_t *kmem_find_general_cachep(size_t size, int gfpflags);
68 69
69/* Size description struct for general caches. */ 70/* Size description struct for general caches. */
diff --git a/mm/slab.c b/mm/slab.c
index 840742641152..c78d343b3c5f 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2620,6 +2620,12 @@ unsigned int kmem_cache_size(kmem_cache_t *cachep)
2620} 2620}
2621EXPORT_SYMBOL(kmem_cache_size); 2621EXPORT_SYMBOL(kmem_cache_size);
2622 2622
2623const char *kmem_cache_name(kmem_cache_t *cachep)
2624{
2625 return cachep->name;
2626}
2627EXPORT_SYMBOL_GPL(kmem_cache_name);
2628
2623struct ccupdate_struct { 2629struct ccupdate_struct {
2624 kmem_cache_t *cachep; 2630 kmem_cache_t *cachep;
2625 struct array_cache *new[NR_CPUS]; 2631 struct array_cache *new[NR_CPUS];