Commit 0a1802eaa49d84dcd7052afb4c334a0c94af1832

Authored by Joonsoo Kim
Committed by Jiri Slaby
1 parent fc8dc0a9f5

mm/compaction: clean-up code on success of ballon isolation

commit b6c750163c0d138f5041d95fcdbd1094b6928057 upstream.

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>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>

Showing 1 changed file with 4 additions and 7 deletions Side-by-side Diff

... ... @@ -560,11 +560,7 @@
560 560 if (unlikely(balloon_page_movable(page))) {
561 561 if (locked && balloon_page_isolate(page)) {
562 562 /* Successfully isolated */
563   - cc->finished_update_migrate = true;
564   - list_add(&page->lru, migratelist);
565   - cc->nr_migratepages++;
566   - nr_isolated++;
567   - goto check_compact_cluster;
  563 + goto isolate_success;
568 564 }
569 565 }
570 566 continue;
571 567  
572 568  
... ... @@ -625,13 +621,14 @@
625 621 VM_BUG_ON(PageTransCompound(page));
626 622  
627 623 /* Successfully isolated */
628   - cc->finished_update_migrate = true;
629 624 del_page_from_lru_list(page, lruvec, page_lru(page));
  625 +
  626 +isolate_success:
  627 + cc->finished_update_migrate = true;
630 628 list_add(&page->lru, migratelist);
631 629 cc->nr_migratepages++;
632 630 nr_isolated++;
633 631  
634   -check_compact_cluster:
635 632 /* Avoid isolating too much */
636 633 if (cc->nr_migratepages == COMPACT_CLUSTER_MAX) {
637 634 ++low_pfn;