diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-05-22 08:01:17 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-05-22 08:01:17 -0700 |
| commit | b33a7bad9bcb5c8453d7a13a99b3151ebe69563f (patch) | |
| tree | 1de88006d14572e2f920f53bf173da41db3eb511 /include/linux/slab.h | |
| parent | 108e31587b9b9b4c6aaa99deb7f50c09c9f9b880 (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.h | 1 |
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 */ |
