summaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-06-19 07:46:19 +0200
committerDavid S. Miller <davem@davemloft.net>2005-06-19 07:46:19 +0200
commit1944972d3bb651474a5021c9da8d0166ae19f1eb (patch)
treecc638b40d8a7dfb4949d4a84a695ec8915c0fc2b /mm/slab.c
parent[IPSEC] Use NLMSG_LENGTH in xfrm_exp_state_notify (diff)
downloadlinux-1944972d3bb651474a5021c9da8d0166ae19f1eb.tar.xz
linux-1944972d3bb651474a5021c9da8d0166ae19f1eb.zip
[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/slab.c')
-rw-r--r--mm/slab.c6
1 files changed, 6 insertions, 0 deletions
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)
}
EXPORT_SYMBOL(kmem_cache_size);
+const char *kmem_cache_name(kmem_cache_t *cachep)
+{
+ return cachep->name;
+}
+EXPORT_SYMBOL_GPL(kmem_cache_name);
+
struct ccupdate_struct {
kmem_cache_t *cachep;
struct array_cache *new[NR_CPUS];