From 88b959887b691bb4f4e679d782d9bb79f14e07db Mon Sep 17 00:00:00 2001 From: David Rientjes Date: Tue, 25 Jan 2011 15:07:23 -0800 Subject: [PATCH] --- yaml --- r: 232410 b: refs/heads/master c: 2ff754fa8f416e82327f2d8f1354a033b66286df h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/page_alloc.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index a93225488d27..e42f21fb17d6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f33261d75b88f55a08e6a9648cef73509979bfba +refs/heads/master: 2ff754fa8f416e82327f2d8f1354a033b66286df diff --git a/trunk/mm/page_alloc.c b/trunk/mm/page_alloc.c index f4967910c967..a873e61e312e 100644 --- a/trunk/mm/page_alloc.c +++ b/trunk/mm/page_alloc.c @@ -1088,8 +1088,10 @@ static void drain_pages(unsigned int cpu) pset = per_cpu_ptr(zone->pageset, cpu); pcp = &pset->pcp; - free_pcppages_bulk(zone, pcp->count, pcp); - pcp->count = 0; + if (pcp->count) { + free_pcppages_bulk(zone, pcp->count, pcp); + pcp->count = 0; + } local_irq_restore(flags); } }