aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/compaction.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/mm/compaction.c b/mm/compaction.c
index 054c28b51c75..37f976287068 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -460,12 +460,13 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc,
460 unsigned long last_pageblock_nr = 0, pageblock_nr; 460 unsigned long last_pageblock_nr = 0, pageblock_nr;
461 unsigned long nr_scanned = 0, nr_isolated = 0; 461 unsigned long nr_scanned = 0, nr_isolated = 0;
462 struct list_head *migratelist = &cc->migratepages; 462 struct list_head *migratelist = &cc->migratepages;
463 isolate_mode_t mode = 0;
464 struct lruvec *lruvec; 463 struct lruvec *lruvec;
465 unsigned long flags; 464 unsigned long flags;
466 bool locked = false; 465 bool locked = false;
467 struct page *page = NULL, *valid_page = NULL; 466 struct page *page = NULL, *valid_page = NULL;
468 bool skipped_async_unsuitable = false; 467 bool skipped_async_unsuitable = false;
468 const isolate_mode_t mode = (!cc->sync ? ISOLATE_ASYNC_MIGRATE : 0) |
469 (unevictable ? ISOLATE_UNEVICTABLE : 0);
469 470
470 /* 471 /*
471 * Ensure that there are not too many pages isolated from the LRU 472 * Ensure that there are not too many pages isolated from the LRU
@@ -608,12 +609,6 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc,
608 continue; 609 continue;
609 } 610 }
610 611
611 if (!cc->sync)
612 mode |= ISOLATE_ASYNC_MIGRATE;
613
614 if (unevictable)
615 mode |= ISOLATE_UNEVICTABLE;
616
617 lruvec = mem_cgroup_page_lruvec(page, zone); 612 lruvec = mem_cgroup_page_lruvec(page, zone);
618 613
619 /* Try isolate the page */ 614 /* Try isolate the page */