From c59def9f222d44bb7e2f0a559f2906191a0862d7 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 16 May 2007 22:10:50 -0700 Subject: Slab allocators: Drop support for destructors There is no user of destructors left. There is no reason why we should keep checking for destructors calls in the slab allocators. The RFC for this patch was discussed at http://marc.info/?l=linux-kernel&m=117882364330705&w=2 Destructors were mainly used for list management which required them to take a spinlock. Taking a spinlock in a destructor is a bit risky since the slab allocators may run the destructors anytime they decide a slab is no longer needed. Patch drops destructor support. Any attempt to use a destructor will BUG(). Acked-by: Pekka Enberg Acked-by: Paul Mundt Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/slub_def.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index c6c1f4a120e..5e2e7297dfa 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h @@ -40,7 +40,6 @@ struct kmem_cache { int objects; /* Number of objects in slab */ int refcount; /* Refcount for slab cache destroy */ void (*ctor)(void *, struct kmem_cache *, unsigned long); - void (*dtor)(void *, struct kmem_cache *, unsigned long); int inuse; /* Offset to metadata */ int align; /* Alignment */ const char *name; /* Name (only for display!) */ -- cgit v1.2.2