spin_lock_irq(&cachep->spinlock);  for(;;) { struct list_head *p;  p = cachep->lists.slabs_free.prev; if (p == &cachep->lists.slabs_free) break;  slabp = list_entry(cachep->lists.slabs_free.prev, struct slab, list); #if DEBUG if (slabp->inuse) BUG(); #endif list_del(&slabp->list);  cachep->lists.free_objects -= cachep->num; spin_unlock_irq(&cachep->spinlock); slab_destroy(cachep, slabp); spin_lock_irq(&cachep->spinlock);
for_each_online_node(i) { l3 = cachep->nodelists[i]; if (l3) { spin_lock_irq(&l3->list_lock); ret += __node_shrink(cachep, i); spin_unlock_irq(&l3->list_lock); }
static int __cache_shrink(kmem_cache_t *cachep){	struct slab *slabp;	int ret;	drain_cpu_caches(cachep);	check_irq_on();	spin_lock_irq(&cachep->spinlock);	for(;;) {		struct list_head *p;		p = cachep->lists.slabs_free.prev;		if (p == &cachep->lists.slabs_free)			break;		slabp = list_entry(cachep->lists.slabs_free.prev, struct slab, list);#if DEBUG		if (slabp->inuse)			BUG();#endif		list_del(&slabp->list);		cachep->lists.free_objects -= cachep->num;		spin_unlock_irq(&cachep->spinlock);		slab_destroy(cachep, slabp);		spin_lock_irq(&cachep->spinlock);	}	ret = !list_empty(&cachep->lists.slabs_full) ||		!list_empty(&cachep->lists.slabs_partial);	spin_unlock_irq(&cachep->spinlock);	return ret;}