Skip to content

Commit b6c7501

Browse files
JoonsooKimtorvalds
authored andcommitted
mm/compaction: clean-up code on success of ballon isolation
It is just for clean-up to reduce code size and improve readability. There is no functional change. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Mel Gorman <mgorman@suse.de> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent c122b20 commit b6c7501

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

‎mm/compaction.c‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -562,11 +562,7 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc,
562562
if (unlikely(balloon_page_movable(page))) {
563563
if (locked && balloon_page_isolate(page)) {
564564
/* Successfully isolated */
565-
cc->finished_update_migrate = true;
566-
list_add(&page->lru, migratelist);
567-
cc->nr_migratepages++;
568-
nr_isolated++;
569-
goto check_compact_cluster;
565+
goto isolate_success;
570566
}
571567
}
572568
continue;
@@ -627,13 +623,14 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc,
627623
VM_BUG_ON_PAGE(PageTransCompound(page), page);
628624

629625
/* Successfully isolated */
630-
cc->finished_update_migrate = true;
631626
del_page_from_lru_list(page, lruvec, page_lru(page));
627+
628+
isolate_success:
629+
cc->finished_update_migrate = true;
632630
list_add(&page->lru, migratelist);
633631
cc->nr_migratepages++;
634632
nr_isolated++;
635633

636-
check_compact_cluster:
637634
/* Avoid isolating too much */
638635
if (cc->nr_migratepages == COMPACT_CLUSTER_MAX) {
639636
++low_pfn;

0 commit comments

Comments
 (0)