From: Joonsoo Kim Date: Mon, 7 Apr 2014 22:37:07 +0000 (-0700) Subject: mm/compaction: clean-up code on success of ballon isolation X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=b6c750163c0d138f5041d95fcdbd1094b6928057;p=openwrt%2Fstaging%2Fblogic.git 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 Acked-by: Vlastimil Babka Cc: Mel Gorman Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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, if (unlikely(balloon_page_movable(page))) { if (locked && balloon_page_isolate(page)) { /* Successfully isolated */ - cc->finished_update_migrate = true; - list_add(&page->lru, migratelist); - cc->nr_migratepages++; - nr_isolated++; - goto check_compact_cluster; + goto isolate_success; } } continue; @@ -627,13 +623,14 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc, VM_BUG_ON_PAGE(PageTransCompound(page), page); /* Successfully isolated */ - cc->finished_update_migrate = true; del_page_from_lru_list(page, lruvec, page_lru(page)); + +isolate_success: + cc->finished_update_migrate = true; list_add(&page->lru, migratelist); cc->nr_migratepages++; nr_isolated++; -check_compact_cluster: /* Avoid isolating too much */ if (cc->nr_migratepages == COMPACT_CLUSTER_MAX) { ++low_pfn;