summaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-04 07:40:19 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-04 07:40:19 +0000
commit33263fc5f9ac8e8cb2b22d06af3ce5ac1dd815e4 (patch)
tree2d1b86a40bef0958a68cf1a2eafbeb0667a70543 /mm/slab.c
parent216f5f51aa02f8b113aa620ebc14a9631a217a00 (diff)
Merge with Linux 2.3.32.
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 405cf8f88..bc0378697 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1047,20 +1047,12 @@ static int __kmem_cache_shrink(kmem_cache_t *cachep)
int
kmem_cache_shrink(kmem_cache_t *cachep)
{
- if (!cachep) {
- printk(KERN_ERR "kmem_shrink: NULL ptr\n");
- return 2;
- }
- if (in_interrupt()) {
- printk(KERN_ERR "kmem_shrink: Called during int - %s\n", cachep->c_name);
- return 2;
- }
-
- if (!is_chained_kmem_cache(cachep)) {
- printk(KERN_ERR "kmem_shrink: Invalid cache addr %p\n",
- cachep);
- return 2;
- }
+ if (!cachep)
+ BUG();
+ if (in_interrupt())
+ BUG();
+ if (!is_chained_kmem_cache(cachep))
+ BUG();
return __kmem_cache_shrink(cachep);
}