Skip to content

Commit 32aaf05

Browse files
Kled-kerneltorvalds
authored andcommitted
mm/compaction.c: remove unnecessary zone parameter in isolate_migratepages()
Like commit 40cacbc ("mm, compaction: remove unnecessary zone parameter in some instances"), remove unnecessary zone parameter. No functional change. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Pengfei Li <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Acked-by: Vlastimil Babka <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Qian Cai <[email protected]> Cc: Andrey Ryabinin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent a94b525 commit 32aaf05

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

mm/compaction.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,8 +1737,7 @@ static unsigned long fast_find_migrateblock(struct compact_control *cc)
17371737
* starting at the block pointed to by the migrate scanner pfn within
17381738
* compact_control.
17391739
*/
1740-
static isolate_migrate_t isolate_migratepages(struct zone *zone,
1741-
struct compact_control *cc)
1740+
static isolate_migrate_t isolate_migratepages(struct compact_control *cc)
17421741
{
17431742
unsigned long block_start_pfn;
17441743
unsigned long block_end_pfn;
@@ -1756,8 +1755,8 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone,
17561755
*/
17571756
low_pfn = fast_find_migrateblock(cc);
17581757
block_start_pfn = pageblock_start_pfn(low_pfn);
1759-
if (block_start_pfn < zone->zone_start_pfn)
1760-
block_start_pfn = zone->zone_start_pfn;
1758+
if (block_start_pfn < cc->zone->zone_start_pfn)
1759+
block_start_pfn = cc->zone->zone_start_pfn;
17611760

17621761
/*
17631762
* fast_find_migrateblock marks a pageblock skipped so to avoid
@@ -1787,8 +1786,8 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone,
17871786
if (!(low_pfn % (SWAP_CLUSTER_MAX * pageblock_nr_pages)))
17881787
cond_resched();
17891788

1790-
page = pageblock_pfn_to_page(block_start_pfn, block_end_pfn,
1791-
zone);
1789+
page = pageblock_pfn_to_page(block_start_pfn,
1790+
block_end_pfn, cc->zone);
17921791
if (!page)
17931792
continue;
17941793

@@ -2169,7 +2168,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
21692168
cc->rescan = true;
21702169
}
21712170

2172-
switch (isolate_migratepages(cc->zone, cc)) {
2171+
switch (isolate_migratepages(cc)) {
21732172
case ISOLATE_ABORT:
21742173
ret = COMPACT_CONTENDED;
21752174
putback_movable_pages(&cc->migratepages);

0 commit comments

Comments
 (0)