Skip to content

Commit 19d3cf9

Browse files
Yanfei Xutorvalds
authored andcommitted
mm/compaction: rename 'start_pfn' to 'iteration_start_pfn' in compact_zone()
There are two 'start_pfn' declared in compact_zone() which have different meanings. Rename the second one to 'iteration_start_pfn' to prevent confusion. Also, remove an useless semicolon. Link: https://lkml.kernel.org/r/20201019115044.1571-1-yanfei.xu@windriver.com Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com> Acked-by: David Hildenbrand <david@redhat.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 135f97f commit 19d3cf9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mm/compaction.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2275,7 +2275,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
22752275

22762276
while ((ret = compact_finished(cc)) == COMPACT_CONTINUE) {
22772277
int err;
2278-
unsigned long start_pfn = cc->migrate_pfn;
2278+
unsigned long iteration_start_pfn = cc->migrate_pfn;
22792279

22802280
/*
22812281
* Avoid multiple rescans which can happen if a page cannot be
@@ -2287,7 +2287,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
22872287
*/
22882288
cc->rescan = false;
22892289
if (pageblock_start_pfn(last_migrated_pfn) ==
2290-
pageblock_start_pfn(start_pfn)) {
2290+
pageblock_start_pfn(iteration_start_pfn)) {
22912291
cc->rescan = true;
22922292
}
22932293

@@ -2311,8 +2311,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
23112311
goto check_drain;
23122312
case ISOLATE_SUCCESS:
23132313
update_cached = false;
2314-
last_migrated_pfn = start_pfn;
2315-
;
2314+
last_migrated_pfn = iteration_start_pfn;
23162315
}
23172316

23182317
err = migrate_pages(&cc->migratepages, compaction_alloc,

0 commit comments

Comments
 (0)