diff options
-rw-r--r-- | include/linux/slab.h | 9 | ||||
-rw-r--r-- | mm/slab.c | 6 | ||||
-rw-r--r-- | mm/slob.c | 6 | ||||
-rw-r--r-- | mm/slub.c | 9 |
4 files changed, 8 insertions, 22 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h index 83d1a1454b7e..743a10415122 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -128,7 +128,6 @@ struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, | |||
128 | void kmem_cache_destroy(struct kmem_cache *); | 128 | void kmem_cache_destroy(struct kmem_cache *); |
129 | int kmem_cache_shrink(struct kmem_cache *); | 129 | int kmem_cache_shrink(struct kmem_cache *); |
130 | void kmem_cache_free(struct kmem_cache *, void *); | 130 | void kmem_cache_free(struct kmem_cache *, void *); |
131 | unsigned int kmem_cache_size(struct kmem_cache *); | ||
132 | 131 | ||
133 | /* | 132 | /* |
134 | * Please use this macro to create slab caches. Simply specify the | 133 | * Please use this macro to create slab caches. Simply specify the |
@@ -388,6 +387,14 @@ static inline void *kzalloc_node(size_t size, gfp_t flags, int node) | |||
388 | return kmalloc_node(size, flags | __GFP_ZERO, node); | 387 | return kmalloc_node(size, flags | __GFP_ZERO, node); |
389 | } | 388 | } |
390 | 389 | ||
390 | /* | ||
391 | * Determine the size of a slab object | ||
392 | */ | ||
393 | static inline unsigned int kmem_cache_size(struct kmem_cache *s) | ||
394 | { | ||
395 | return s->object_size; | ||
396 | } | ||
397 | |||
391 | void __init kmem_cache_init_late(void); | 398 | void __init kmem_cache_init_late(void); |
392 | 399 | ||
393 | #endif /* _LINUX_SLAB_H */ | 400 | #endif /* _LINUX_SLAB_H */ |
@@ -3969,12 +3969,6 @@ void kfree(const void *objp) | |||
3969 | } | 3969 | } |
3970 | EXPORT_SYMBOL(kfree); | 3970 | EXPORT_SYMBOL(kfree); |
3971 | 3971 | ||
3972 | unsigned int kmem_cache_size(struct kmem_cache *cachep) | ||
3973 | { | ||
3974 | return cachep->object_size; | ||
3975 | } | ||
3976 | EXPORT_SYMBOL(kmem_cache_size); | ||
3977 | |||
3978 | /* | 3972 | /* |
3979 | * This initializes kmem_list3 or resizes various caches for all nodes. | 3973 | * This initializes kmem_list3 or resizes various caches for all nodes. |
3980 | */ | 3974 | */ |
@@ -604,12 +604,6 @@ void kmem_cache_free(struct kmem_cache *c, void *b) | |||
604 | } | 604 | } |
605 | EXPORT_SYMBOL(kmem_cache_free); | 605 | EXPORT_SYMBOL(kmem_cache_free); |
606 | 606 | ||
607 | unsigned int kmem_cache_size(struct kmem_cache *c) | ||
608 | { | ||
609 | return c->object_size; | ||
610 | } | ||
611 | EXPORT_SYMBOL(kmem_cache_size); | ||
612 | |||
613 | int __kmem_cache_shutdown(struct kmem_cache *c) | 607 | int __kmem_cache_shutdown(struct kmem_cache *c) |
614 | { | 608 | { |
615 | /* No way to check for remaining objects */ | 609 | /* No way to check for remaining objects */ |
@@ -3121,15 +3121,6 @@ error: | |||
3121 | return -EINVAL; | 3121 | return -EINVAL; |
3122 | } | 3122 | } |
3123 | 3123 | ||
3124 | /* | ||
3125 | * Determine the size of a slab object | ||
3126 | */ | ||
3127 | unsigned int kmem_cache_size(struct kmem_cache *s) | ||
3128 | { | ||
3129 | return s->object_size; | ||
3130 | } | ||
3131 | EXPORT_SYMBOL(kmem_cache_size); | ||
3132 | |||
3133 | static void list_slab_objects(struct kmem_cache *s, struct page *page, | 3124 | static void list_slab_objects(struct kmem_cache *s, struct page *page, |
3134 | const char *text) | 3125 | const char *text) |
3135 | { | 3126 | { |