patch-2.1.90 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.89/linux/mm/slab.c linux/mm/slab.c
@@ -1808,7 +1808,9 @@
 	}
 
 	spin_lock_irq(&best_cachep->c_spinlock);
-	if (!best_cachep->c_growing && !(slabp = best_cachep->c_lastp)->s_inuse && slabp != kmem_slab_end(best_cachep)) {
+	while (!best_cachep->c_growing &&
+	       !(slabp = best_cachep->c_lastp)->s_inuse &&
+	       slabp != kmem_slab_end(best_cachep)) {
 		if (gfp_mask & GFP_DMA) {
 			do {
 				if (slabp->s_dma)
@@ -1832,7 +1834,7 @@
 		 */
 		spin_unlock_irq(&best_cachep->c_spinlock);
 		kmem_slab_destroy(best_cachep, slabp);
-		return;
+		spin_lock_irq(&best_cachep->c_spinlock);
 	}
 dma_fail:
 	spin_unlock_irq(&best_cachep->c_spinlock);

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