diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2009-01-06 17:39:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-06 18:59:00 -0500 |
commit | 64cdd548ffe26849d4cd113ac640f60606063b14 (patch) | |
tree | 9a7a8af9022621d2da3648757b724fcd32b20168 /mm/rmap.c | |
parent | 1b0bd118862cd9fe9ac2872137a1b8107e83ff9d (diff) |
mm: cleanup: remove #ifdef CONFIG_MIGRATION
#ifdef in *.c file decrease source readability a bit. removing is better.
This patch doesn't have any functional change.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/rmap.c')
-rw-r--r-- | mm/rmap.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/kallsyms.h> | 50 | #include <linux/kallsyms.h> |
51 | #include <linux/memcontrol.h> | 51 | #include <linux/memcontrol.h> |
52 | #include <linux/mmu_notifier.h> | 52 | #include <linux/mmu_notifier.h> |
53 | #include <linux/migrate.h> | ||
53 | 54 | ||
54 | #include <asm/tlbflush.h> | 55 | #include <asm/tlbflush.h> |
55 | 56 | ||
@@ -818,8 +819,7 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma, | |||
818 | spin_unlock(&mmlist_lock); | 819 | spin_unlock(&mmlist_lock); |
819 | } | 820 | } |
820 | dec_mm_counter(mm, anon_rss); | 821 | dec_mm_counter(mm, anon_rss); |
821 | #ifdef CONFIG_MIGRATION | 822 | } else if (PAGE_MIGRATION) { |
822 | } else { | ||
823 | /* | 823 | /* |
824 | * Store the pfn of the page in a special migration | 824 | * Store the pfn of the page in a special migration |
825 | * pte. do_swap_page() will wait until the migration | 825 | * pte. do_swap_page() will wait until the migration |
@@ -827,19 +827,15 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma, | |||
827 | */ | 827 | */ |
828 | BUG_ON(!migration); | 828 | BUG_ON(!migration); |
829 | entry = make_migration_entry(page, pte_write(pteval)); | 829 | entry = make_migration_entry(page, pte_write(pteval)); |
830 | #endif | ||
831 | } | 830 | } |
832 | set_pte_at(mm, address, pte, swp_entry_to_pte(entry)); | 831 | set_pte_at(mm, address, pte, swp_entry_to_pte(entry)); |
833 | BUG_ON(pte_file(*pte)); | 832 | BUG_ON(pte_file(*pte)); |
834 | } else | 833 | } else if (PAGE_MIGRATION && migration) { |
835 | #ifdef CONFIG_MIGRATION | ||
836 | if (migration) { | ||
837 | /* Establish migration entry for a file page */ | 834 | /* Establish migration entry for a file page */ |
838 | swp_entry_t entry; | 835 | swp_entry_t entry; |
839 | entry = make_migration_entry(page, pte_write(pteval)); | 836 | entry = make_migration_entry(page, pte_write(pteval)); |
840 | set_pte_at(mm, address, pte, swp_entry_to_pte(entry)); | 837 | set_pte_at(mm, address, pte, swp_entry_to_pte(entry)); |
841 | } else | 838 | } else |
842 | #endif | ||
843 | dec_mm_counter(mm, file_rss); | 839 | dec_mm_counter(mm, file_rss); |
844 | 840 | ||
845 | 841 | ||