Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7303f1b authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm/compaction.c: correct zone boundary handling when isolating pages from a pageblock"

parents 98c80f9c b3378ed4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1230,7 +1230,7 @@ fast_isolate_around(struct compact_control *cc, unsigned long pfn, unsigned long

	/* Pageblock boundaries */
	start_pfn = pageblock_start_pfn(pfn);
	end_pfn = min(start_pfn + pageblock_nr_pages, zone_end_pfn(cc->zone));
	end_pfn = min(pageblock_end_pfn(pfn), zone_end_pfn(cc->zone)) - 1;

	/* Scan before */
	if (start_pfn != pfn) {
@@ -1241,7 +1241,7 @@ fast_isolate_around(struct compact_control *cc, unsigned long pfn, unsigned long

	/* Scan after */
	start_pfn = pfn + nr_isolated;
	if (start_pfn != end_pfn)
	if (start_pfn < end_pfn)
		isolate_freepages_block(cc, &start_pfn, end_pfn, &cc->freepages, 1, false);

	/* Skip this pageblock in the future as it's full or nearly full */