patch-2.3.29 linux/mm/slab.c

Next file: linux/mm/vmalloc.c
Previous file: linux/mm/page_alloc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.28/linux/mm/slab.c linux/mm/slab.c
@@ -1043,20 +1043,12 @@
 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);
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)