Commit b6c75016 authored by Joonsoo Kim's avatar Joonsoo Kim Committed by Linus Torvalds

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: default avatarJoonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: default avatarVlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c122b208
...@@ -562,11 +562,7 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc, ...@@ -562,11 +562,7 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc,
if (unlikely(balloon_page_movable(page))) { if (unlikely(balloon_page_movable(page))) {
if (locked && balloon_page_isolate(page)) { if (locked && balloon_page_isolate(page)) {
/* Successfully isolated */ /* Successfully isolated */
cc->finished_update_migrate = true; goto isolate_success;
list_add(&page->lru, migratelist);
cc->nr_migratepages++;
nr_isolated++;
goto check_compact_cluster;
} }
} }
continue; continue;
...@@ -627,13 +623,14 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc, ...@@ -627,13 +623,14 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc,
VM_BUG_ON_PAGE(PageTransCompound(page), page); VM_BUG_ON_PAGE(PageTransCompound(page), page);
/* Successfully isolated */ /* Successfully isolated */
cc->finished_update_migrate = true;
del_page_from_lru_list(page, lruvec, page_lru(page)); del_page_from_lru_list(page, lruvec, page_lru(page));
isolate_success:
cc->finished_update_migrate = true;
list_add(&page->lru, migratelist); list_add(&page->lru, migratelist);
cc->nr_migratepages++; cc->nr_migratepages++;
nr_isolated++; nr_isolated++;
check_compact_cluster:
/* Avoid isolating too much */ /* Avoid isolating too much */
if (cc->nr_migratepages == COMPACT_CLUSTER_MAX) { if (cc->nr_migratepages == COMPACT_CLUSTER_MAX) {
++low_pfn; ++low_pfn;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment