diff options
Diffstat (limited to 'mm/percpu.c')
-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 083e7c91e5f6..b336638d20e7 100644 --- a/mm/percpu.c +++ b/mm/percpu.c | |||
@@ -913,11 +913,10 @@ static void pcpu_depopulate_chunk(struct pcpu_chunk *chunk, int off, int size) | |||
913 | int rs, re; | 913 | int rs, re; |
914 | 914 | ||
915 | /* quick path, check whether it's empty already */ | 915 | /* quick path, check whether it's empty already */ |
916 | pcpu_for_each_unpop_region(chunk, rs, re, page_start, page_end) { | 916 | rs = page_start; |
917 | if (rs == page_start && re == page_end) | 917 | pcpu_next_unpop(chunk, &rs, &re, page_end); |
918 | return; | 918 | if (rs == page_start && re == page_end) |
919 | break; | 919 | return; |
920 | } | ||
921 | 920 | ||
922 | /* immutable chunks can't be depopulated */ | 921 | /* immutable chunks can't be depopulated */ |
923 | WARN_ON(chunk->immutable); | 922 | WARN_ON(chunk->immutable); |
@@ -968,11 +967,10 @@ static int pcpu_populate_chunk(struct pcpu_chunk *chunk, int off, int size) | |||
968 | int rs, re, rc; | 967 | int rs, re, rc; |
969 | 968 | ||
970 | /* quick path, check whether all pages are already there */ | 969 | /* quick path, check whether all pages are already there */ |
971 | pcpu_for_each_pop_region(chunk, rs, re, page_start, page_end) { | 970 | rs = page_start; |
972 | if (rs == page_start && re == page_end) | 971 | pcpu_next_pop(chunk, &rs, &re, page_end); |
973 | goto clear; | 972 | if (rs == page_start && re == page_end) |
974 | break; | 973 | goto clear; |
975 | } | ||
976 | 974 | ||
977 | /* need to allocate and map pages, this chunk can't be immutable */ | 975 | /* need to allocate and map pages, this chunk can't be immutable */ |
978 | WARN_ON(chunk->immutable); | 976 | WARN_ON(chunk->immutable); |