From 6819f0455239206989f72145b571a6bc518518f7 Mon Sep 17 00:00:00 2001 From: WANG Cong Date: Tue, 1 Dec 2009 23:28:10 +0900 Subject: [PATCH] --- yaml --- r: 185011 b: refs/heads/master c: 22b737f4c75197372d64afc6ed1bccd58c00e549 h: refs/heads/master i: 185009: 0597840564d09d897e993a462ae1707addf6aacc 185007: 1221306828aaae2571dc855bde48d063179c9f4e v: v3 --- [refs] | 2 +- trunk/mm/percpu.c | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 492ad2808967..2930656e1e32 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 85438592f179c126ad4cb9a280046d4f0a501e6d +refs/heads/master: 22b737f4c75197372d64afc6ed1bccd58c00e549 diff --git a/trunk/mm/percpu.c b/trunk/mm/percpu.c index e2e80fc78601..77c6f7994a46 100644 --- a/trunk/mm/percpu.c +++ b/trunk/mm/percpu.c @@ -886,11 +886,10 @@ static void pcpu_depopulate_chunk(struct pcpu_chunk *chunk, int off, int size) int rs, re; /* quick path, check whether it's empty already */ - pcpu_for_each_unpop_region(chunk, rs, re, page_start, page_end) { - if (rs == page_start && re == page_end) - return; - break; - } + rs = page_start; + pcpu_next_unpop(chunk, &rs, &re, page_end); + if (rs == page_start && re == page_end) + return; /* immutable chunks can't be depopulated */ WARN_ON(chunk->immutable); @@ -941,11 +940,10 @@ static int pcpu_populate_chunk(struct pcpu_chunk *chunk, int off, int size) int rs, re, rc; /* quick path, check whether all pages are already there */ - pcpu_for_each_pop_region(chunk, rs, re, page_start, page_end) { - if (rs == page_start && re == page_end) - goto clear; - break; - } + rs = page_start; + pcpu_next_pop(chunk, &rs, &re, page_end); + if (rs == page_start && re == page_end) + goto clear; /* need to allocate and map pages, this chunk can't be immutable */ WARN_ON(chunk->immutable);