diff options
-rw-r--r-- | mm/percpu.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/mm/percpu.c b/mm/percpu.c index e2e80fc78601..77c6f7994a46 100644 --- a/mm/percpu.c +++ b/mm/percpu.c | |||
@@ -886,11 +886,10 @@ static void pcpu_depopulate_chunk(struct pcpu_chunk *chunk, int off, int size) | |||
886 | int rs, re; | 886 | int rs, re; |
887 | 887 | ||
888 | /* quick path, check whether it's empty already */ | 888 | /* quick path, check whether it's empty already */ |
889 | pcpu_for_each_unpop_region(chunk, rs, re, page_start, page_end) { | 889 | rs = page_start; |
890 | if (rs == page_start && re == page_end) | 890 | pcpu_next_unpop(chunk, &rs, &re, page_end); |
891 | return; | 891 | if (rs == page_start && re == page_end) |
892 | break; | 892 | return; |
893 | } | ||
894 | 893 | ||
895 | /* immutable chunks can't be depopulated */ | 894 | /* immutable chunks can't be depopulated */ |
896 | WARN_ON(chunk->immutable); | 895 | WARN_ON(chunk->immutable); |
@@ -941,11 +940,10 @@ static int pcpu_populate_chunk(struct pcpu_chunk *chunk, int off, int size) | |||
941 | int rs, re, rc; | 940 | int rs, re, rc; |
942 | 941 | ||
943 | /* quick path, check whether all pages are already there */ | 942 | /* quick path, check whether all pages are already there */ |
944 | pcpu_for_each_pop_region(chunk, rs, re, page_start, page_end) { | 943 | rs = page_start; |
945 | if (rs == page_start && re == page_end) | 944 | pcpu_next_pop(chunk, &rs, &re, page_end); |
946 | goto clear; | 945 | if (rs == page_start && re == page_end) |
947 | break; | 946 | goto clear; |
948 | } | ||
949 | 947 | ||
950 | /* need to allocate and map pages, this chunk can't be immutable */ | 948 | /* need to allocate and map pages, this chunk can't be immutable */ |
951 | WARN_ON(chunk->immutable); | 949 | WARN_ON(chunk->immutable); |