]> Git Repo - linux.git/commitdiff
mm/compaction: rename 'start_pfn' to 'iteration_start_pfn' in compact_zone()
authorYanfei Xu <[email protected]>
Tue, 15 Dec 2020 03:12:39 +0000 (19:12 -0800)
committerLinus Torvalds <[email protected]>
Tue, 15 Dec 2020 20:13:45 +0000 (12:13 -0800)
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/[email protected]
Signed-off-by: Yanfei Xu <[email protected]>
Acked-by: David Hildenbrand <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Acked-by: Pankaj Gupta <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/compaction.c

index 13cb7a961b319b11c83fb699a1d6e8e8d4b73e45..4d237a7c3830ba7106ac3fbbfd48039c6588ca94 100644 (file)
@@ -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,
This page took 0.087222 seconds and 4 git commands to generate.