diff options
| -rw-r--r-- | mm/compaction.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/compaction.c b/mm/compaction.c index cbac7277978a..9febc8cc84e7 100644 --- a/mm/compaction.c +++ b/mm/compaction.c | |||
| @@ -1230,7 +1230,7 @@ fast_isolate_around(struct compact_control *cc, unsigned long pfn, unsigned long | |||
| 1230 | 1230 | ||
| 1231 | /* Pageblock boundaries */ | 1231 | /* Pageblock boundaries */ |
| 1232 | start_pfn = pageblock_start_pfn(pfn); | 1232 | start_pfn = pageblock_start_pfn(pfn); |
| 1233 | end_pfn = min(start_pfn + pageblock_nr_pages, zone_end_pfn(cc->zone)); | 1233 | end_pfn = min(pageblock_end_pfn(pfn), zone_end_pfn(cc->zone)) - 1; |
| 1234 | 1234 | ||
| 1235 | /* Scan before */ | 1235 | /* Scan before */ |
| 1236 | if (start_pfn != pfn) { | 1236 | if (start_pfn != pfn) { |
| @@ -1241,7 +1241,7 @@ fast_isolate_around(struct compact_control *cc, unsigned long pfn, unsigned long | |||
| 1241 | 1241 | ||
| 1242 | /* Scan after */ | 1242 | /* Scan after */ |
| 1243 | start_pfn = pfn + nr_isolated; | 1243 | start_pfn = pfn + nr_isolated; |
| 1244 | if (start_pfn != end_pfn) | 1244 | if (start_pfn < end_pfn) |
| 1245 | isolate_freepages_block(cc, &start_pfn, end_pfn, &cc->freepages, 1, false); | 1245 | isolate_freepages_block(cc, &start_pfn, end_pfn, &cc->freepages, 1, false); |
| 1246 | 1246 | ||
| 1247 | /* Skip this pageblock in the future as it's full or nearly full */ | 1247 | /* Skip this pageblock in the future as it's full or nearly full */ |
