cachep->free_limit -= cachep->batchcount; free_block(cachep, ac_entry(nc), nc->avail);
l3 = cachep->nodelists[node];  if (!l3) goto unlock_cache;  spin_lock(&l3->list_lock);   l3->free_limit -= cachep->batchcount; if (nc) free_block(cachep, nc->entry, nc->avail);  if (!cpus_empty(mask)) { spin_unlock(&l3->list_lock); goto unlock_cache; }  if (l3->shared) { free_block(cachep, l3->shared->entry, l3->shared->avail); kfree(l3->shared); l3->shared = NULL; } if (l3->alien) { drain_alien_cache(cachep, l3); free_alien_cache(l3->alien); l3->alien = NULL; }   if (__node_shrink(cachep, node)) { cachep->nodelists[node] = NULL; spin_unlock(&l3->list_lock); kfree(l3); } else { spin_unlock(&l3->list_lock); } unlock_cache:
static int __devinit cpuup_callback(struct notifier_block *nfb,				  unsigned long action, void *hcpu){	long cpu = (long)hcpu;	kmem_cache_t* cachep;	switch (action) {	case CPU_UP_PREPARE:		down(&cache_chain_sem);		list_for_each_entry(cachep, &cache_chain, next) {			struct array_cache *nc;			nc = alloc_arraycache(cpu, cachep->limit, cachep->batchcount);			if (!nc)				goto bad;			spin_lock_irq(&cachep->spinlock);			cachep->array[cpu] = nc;			cachep->free_limit = (1+num_online_cpus())*cachep->batchcount						+ cachep->num;			spin_unlock_irq(&cachep->spinlock);		}		up(&cache_chain_sem);		break;	case CPU_ONLINE:		start_cpu_timer(cpu);		break;#ifdef CONFIG_HOTPLUG_CPU	case CPU_DEAD:		/* fall thru */	case CPU_UP_CANCELED:		down(&cache_chain_sem);		list_for_each_entry(cachep, &cache_chain, next) {			struct array_cache *nc;			spin_lock_irq(&cachep->spinlock);			/* cpu is dead; no one can alloc from it. */			nc = cachep->array[cpu];			cachep->array[cpu] = NULL;			cachep->free_limit -= cachep->batchcount;			free_block(cachep, ac_entry(nc), nc->avail);			spin_unlock_irq(&cachep->spinlock);			kfree(nc);		}		up(&cache_chain_sem);		break;#endif	}	return NOTIFY_OK;bad:	up(&cache_chain_sem);	return NOTIFY_BAD;}