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
- Lines: 27
- Date:
Sat Nov 20 10:09:05 1999
- Orig file:
v2.3.28/linux/mm/slab.c
- Orig date:
Mon Nov 1 13:56:27 1999
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)