summaryrefslogtreecommitdiffstats
path: root/mm/compaction.c
diff options
context:
space:
mode:
authorYanfei Xu <yanfei.xu@windriver.com>2020-12-14 19:12:39 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2020-12-15 12:13:45 -0800
commit19d3cf9de1c72fd1adaa1d68aa40d74a35688404 (patch)
tree283ff2b299ae388d8e8f1744038c42b080458b3c /mm/compaction.c
parent135f97fd0c398f20a544cc52c3f8a3cb925a8aef (diff)
downloadlinux-19d3cf9de1c72fd1adaa1d68aa40d74a35688404.tar.gz
linux-19d3cf9de1c72fd1adaa1d68aa40d74a35688404.tar.bz2
linux-19d3cf9de1c72fd1adaa1d68aa40d74a35688404.zip
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>
Diffstat (limited to 'mm/compaction.c')
-rw-r--r--mm/compaction.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/compaction.c b/mm/compaction.c
index 13cb7a961b31..4d237a7c3830 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -2275,7 +2275,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
while ((ret = compact_finished(cc)) == COMPACT_CONTINUE) {
int err;
- unsigned long start_pfn = cc->migrate_pfn;
+ unsigned long iteration_start_pfn = cc->migrate_pfn;
/*
* 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)
*/
cc->rescan = false;
if (pageblock_start_pfn(last_migrated_pfn) ==
- pageblock_start_pfn(start_pfn)) {
+ pageblock_start_pfn(iteration_start_pfn)) {
cc->rescan = true;
}
@@ -2311,8 +2311,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
goto check_drain;
case ISOLATE_SUCCESS:
update_cached = false;
- last_migrated_pfn = start_pfn;
- ;
+ last_migrated_pfn = iteration_start_pfn;
}
err = migrate_pages(&cc->migratepages, compaction_alloc,