diff options
author | Arnaldo Carvalho de Melo <acme@ghostprotocols.net> | 2005-06-19 01:46:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-06-19 01:46:19 -0400 |
commit | 1944972d3bb651474a5021c9da8d0166ae19f1eb (patch) | |
tree | cc638b40d8a7dfb4949d4a84a695ec8915c0fc2b /mm | |
parent | ee57eef99b9e19194677f552ebc0690ec35d62db (diff) |
[SLAB] Introduce kmem_cache_name
This is for use with slab users that pass a dynamically allocated slab name in
kmem_cache_create, so that before destroying the slab one can retrieve the name
and free its memory.
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slab.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2620,6 +2620,12 @@ unsigned int kmem_cache_size(kmem_cache_t *cachep) | |||
2620 | } | 2620 | } |
2621 | EXPORT_SYMBOL(kmem_cache_size); | 2621 | EXPORT_SYMBOL(kmem_cache_size); |
2622 | 2622 | ||
2623 | const char *kmem_cache_name(kmem_cache_t *cachep) | ||
2624 | { | ||
2625 | return cachep->name; | ||
2626 | } | ||
2627 | EXPORT_SYMBOL_GPL(kmem_cache_name); | ||
2628 | |||
2623 | struct ccupdate_struct { | 2629 | struct 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]; |