diff options
Diffstat (limited to 'mm/rmap.c')
-rw-r--r-- | mm/rmap.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -596,6 +596,7 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma, | |||
596 | spin_unlock(&mmlist_lock); | 596 | spin_unlock(&mmlist_lock); |
597 | } | 597 | } |
598 | dec_mm_counter(mm, anon_rss); | 598 | dec_mm_counter(mm, anon_rss); |
599 | #ifdef CONFIG_MIGRATION | ||
599 | } else { | 600 | } else { |
600 | /* | 601 | /* |
601 | * Store the pfn of the page in a special migration | 602 | * Store the pfn of the page in a special migration |
@@ -604,12 +605,22 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma, | |||
604 | */ | 605 | */ |
605 | BUG_ON(!migration); | 606 | BUG_ON(!migration); |
606 | entry = make_migration_entry(page, pte_write(pteval)); | 607 | entry = make_migration_entry(page, pte_write(pteval)); |
608 | #endif | ||
607 | } | 609 | } |
608 | set_pte_at(mm, address, pte, swp_entry_to_pte(entry)); | 610 | set_pte_at(mm, address, pte, swp_entry_to_pte(entry)); |
609 | BUG_ON(pte_file(*pte)); | 611 | BUG_ON(pte_file(*pte)); |
610 | } else | 612 | } else |
613 | #ifdef CONFIG_MIGRATION | ||
614 | if (migration) { | ||
615 | /* Establish migration entry for a file page */ | ||
616 | swp_entry_t entry; | ||
617 | entry = make_migration_entry(page, pte_write(pteval)); | ||
618 | set_pte_at(mm, address, pte, swp_entry_to_pte(entry)); | ||
619 | } else | ||
620 | #endif | ||
611 | dec_mm_counter(mm, file_rss); | 621 | dec_mm_counter(mm, file_rss); |
612 | 622 | ||
623 | |||
613 | page_remove_rmap(page); | 624 | page_remove_rmap(page); |
614 | page_cache_release(page); | 625 | page_cache_release(page); |
615 | 626 | ||