aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <khlebnikov@openvz.org>2012-03-21 19:33:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-21 20:54:57 -0400
commitce1744f4ed20ca873360e54502f8a71564ef7cc6 (patch)
treeec26dbc6a5417c75a8fa65ab093374d3e0045032 /mm
parent092b50bacd1cdbffef2643b7a46f2a215407919c (diff)
mm: replace PAGE_MIGRATION with IS_ENABLED(CONFIG_MIGRATION)
Since commit 2a11c8ea20bf ("kconfig: Introduce IS_ENABLED(), IS_BUILTIN() and IS_MODULE()") there is a generic grep-friendly method for checking config options in C expressions. Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/mprotect.c2
-rw-r--r--mm/rmap.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c
index f437d054c3bf..c621e999cbf7 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -60,7 +60,7 @@ static void change_pte_range(struct mm_struct *mm, pmd_t *pmd,
60 ptent = pte_mkwrite(ptent); 60 ptent = pte_mkwrite(ptent);
61 61
62 ptep_modify_prot_commit(mm, addr, pte, ptent); 62 ptep_modify_prot_commit(mm, addr, pte, ptent);
63 } else if (PAGE_MIGRATION && !pte_file(oldpte)) { 63 } else if (IS_ENABLED(CONFIG_MIGRATION) && !pte_file(oldpte)) {
64 swp_entry_t entry = pte_to_swp_entry(oldpte); 64 swp_entry_t entry = pte_to_swp_entry(oldpte);
65 65
66 if (is_write_migration_entry(entry)) { 66 if (is_write_migration_entry(entry)) {
diff --git a/mm/rmap.c b/mm/rmap.c
index c8454e06b6c8..78cc46b876e6 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1282,7 +1282,7 @@ int try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
1282 } 1282 }
1283 dec_mm_counter(mm, MM_ANONPAGES); 1283 dec_mm_counter(mm, MM_ANONPAGES);
1284 inc_mm_counter(mm, MM_SWAPENTS); 1284 inc_mm_counter(mm, MM_SWAPENTS);
1285 } else if (PAGE_MIGRATION) { 1285 } else if (IS_ENABLED(CONFIG_MIGRATION)) {
1286 /* 1286 /*
1287 * Store the pfn of the page in a special migration 1287 * Store the pfn of the page in a special migration
1288 * pte. do_swap_page() will wait until the migration 1288 * pte. do_swap_page() will wait until the migration
@@ -1293,7 +1293,8 @@ int try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
1293 } 1293 }
1294 set_pte_at(mm, address, pte, swp_entry_to_pte(entry)); 1294 set_pte_at(mm, address, pte, swp_entry_to_pte(entry));
1295 BUG_ON(pte_file(*pte)); 1295 BUG_ON(pte_file(*pte));
1296 } else if (PAGE_MIGRATION && (TTU_ACTION(flags) == TTU_MIGRATION)) { 1296 } else if (IS_ENABLED(CONFIG_MIGRATION) &&
1297 (TTU_ACTION(flags) == TTU_MIGRATION)) {
1297 /* Establish migration entry for a file page */ 1298 /* Establish migration entry for a file page */
1298 swp_entry_t entry; 1299 swp_entry_t entry;
1299 entry = make_migration_entry(page, pte_write(pteval)); 1300 entry = make_migration_entry(page, pte_write(pteval));
@@ -1499,7 +1500,7 @@ static int try_to_unmap_anon(struct page *page, enum ttu_flags flags)
1499 * locking requirements of exec(), migration skips 1500 * locking requirements of exec(), migration skips
1500 * temporary VMAs until after exec() completes. 1501 * temporary VMAs until after exec() completes.
1501 */ 1502 */
1502 if (PAGE_MIGRATION && (flags & TTU_MIGRATION) && 1503 if (IS_ENABLED(CONFIG_MIGRATION) && (flags & TTU_MIGRATION) &&
1503 is_vma_temporary_stack(vma)) 1504 is_vma_temporary_stack(vma))
1504 continue; 1505 continue;
1505 1506