diff options
author | Joonsoo Kim <iamjoonsoo.kim@lge.com> | 2014-04-07 18:37:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-07 19:35:51 -0400 |
commit | b6c750163c0d138f5041d95fcdbd1094b6928057 (patch) | |
tree | 30c99a5bff21b21c3d449900b4f9806431a3d096 /mm/compaction.c | |
parent | c122b2087ab94192f2b937e47b563a9c4e688ece (diff) |
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>
Diffstat (limited to 'mm/compaction.c')
-rw-r--r-- | mm/compaction.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/mm/compaction.c b/mm/compaction.c index 6878c005bc8e..054c28b51c75 100644 --- a/mm/compaction.c +++ b/mm/compaction.c | |||
@@ -562,11 +562,7 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc, | |||
562 | if (unlikely(balloon_page_movable(page))) { | 562 | if (unlikely(balloon_page_movable(page))) { |
563 | if (locked && balloon_page_isolate(page)) { | 563 | if (locked && balloon_page_isolate(page)) { |
564 | /* Successfully isolated */ | 564 | /* Successfully isolated */ |
565 | cc->finished_update_migrate = true; | 565 | goto isolate_success; |
566 | list_add(&page->lru, migratelist); | ||
567 | cc->nr_migratepages++; | ||
568 | nr_isolated++; | ||
569 | goto check_compact_cluster; | ||
570 | } | 566 | } |
571 | } | 567 | } |
572 | continue; | 568 | continue; |
@@ -627,13 +623,14 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc, | |||
627 | VM_BUG_ON_PAGE(PageTransCompound(page), page); | 623 | VM_BUG_ON_PAGE(PageTransCompound(page), page); |
628 | 624 | ||
629 | /* Successfully isolated */ | 625 | /* Successfully isolated */ |
630 | cc->finished_update_migrate = true; | ||
631 | del_page_from_lru_list(page, lruvec, page_lru(page)); | 626 | del_page_from_lru_list(page, lruvec, page_lru(page)); |
627 | |||
628 | isolate_success: | ||
629 | cc->finished_update_migrate = true; | ||
632 | list_add(&page->lru, migratelist); | 630 | list_add(&page->lru, migratelist); |
633 | cc->nr_migratepages++; | 631 | cc->nr_migratepages++; |
634 | nr_isolated++; | 632 | nr_isolated++; |
635 | 633 | ||
636 | check_compact_cluster: | ||
637 | /* Avoid isolating too much */ | 634 | /* Avoid isolating too much */ |
638 | if (cc->nr_migratepages == COMPACT_CLUSTER_MAX) { | 635 | if (cc->nr_migratepages == COMPACT_CLUSTER_MAX) { |
639 | ++low_pfn; | 636 | ++low_pfn; |