patch-2.1.34 linux/mm/slab.c

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

diff -u --recursive --new-file v2.1.33/linux/mm/slab.c linux/mm/slab.c
@@ -478,7 +478,7 @@
 		printk(KERN_ERR "%sNULL ptr\n", func_nm);
 		return NULL;
 	}
-	if (0 && intr_count) {
+	if (in_interrupt()) {
 		printk(KERN_ERR "%sCalled during int - %s\n", func_nm, name);
 		return NULL;
 	}
@@ -743,7 +743,7 @@
 		goto err_end;
 	}
 
-	if (0 && intr_count) {
+	if (in_interrupt()) {
 		printk(KERN_ERR "kmem_dest: Called during int - %s\n", cachep->c_name);
 err_end:
 		return 1;
@@ -809,7 +809,7 @@
 		goto end;
 	}
 
-	if (0 && intr_count) {
+	if (in_interrupt()) {
 		printk(KERN_ERR "kmem_shrink: Called during int - %s\n", cachep->c_name);
 		goto end;
 	}
@@ -951,7 +951,7 @@
 	 * in kmem_cache_alloc().  If a caller is slightly mis-behaving,
 	 * will eventually be caught here (where it matters)
 	 */
-	if (0 && intr_count && (flags & SLAB_LEVEL_MASK) != SLAB_ATOMIC) {
+	if (in_interrupt() && (flags & SLAB_LEVEL_MASK) != SLAB_ATOMIC) {
 		static int count = 0;
 		if (count < 8) {
 			printk(KERN_ERR "kmem_grow: Called nonatomically from "

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov