summaryrefslogtreecommitdiff
path: root/include/linux/slab.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-05-22 08:01:17 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-22 08:01:17 -0700
commitb33a7bad9bcb5c8453d7a13a99b3151ebe69563f (patch)
tree1de88006d14572e2f920f53bf173da41db3eb511 /include/linux/slab.h
parent108e31587b9b9b4c6aaa99deb7f50c09c9f9b880 (diff)
[PATCH] slab: consolidate panic code
Many places do: if (kmem_cache_create(...) == NULL) panic(...); We can consolidate all that by passing another flag to kmem_cache_create() which says "panic if it doesn't work".
Diffstat (limited to 'include/linux/slab.h')
-rw-r--r--include/linux/slab.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 91e4d410c32f..e60ff6399a47 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -44,6 +44,7 @@ typedef struct kmem_cache_s kmem_cache_t;
#define SLAB_STORE_USER 0x00010000UL /* store the last owner for bug hunting */
#define SLAB_RECLAIM_ACCOUNT 0x00020000UL /* track pages allocated to indicate
what is reclaimable later*/
+#define SLAB_PANIC 0x00040000UL /* panic if kmem_cache_create() fails */
/* flags passed to a constructor func */
#define SLAB_CTOR_CONSTRUCTOR 0x001UL /* if not set, then deconstructor */