aboutsummaryrefslogtreecommitdiffstats
path: root/mm/migrate.c
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2009-12-14 20:58:11 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-15 11:53:12 -0500
commit6d9c285a632b39ab83c6ae14cbff0e606d4042ee (patch)
treee8d334046befcce98abd9ac8bd5350597fe5a59f /mm/migrate.c
parentee32398fda8ab9867cf8d5469d6e83de5f5c1f7c (diff)
mm: move inc_zone_page_state(NR_ISOLATED) to just isolated place
Christoph pointed out inc_zone_page_state(NR_ISOLATED) should be placed in right after isolate_page(). This patch does it. Reviewed-by: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/migrate.c')
-rw-r--r--mm/migrate.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 0bc640fd68fa..576c25eeb1ca 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -746,13 +746,6 @@ int migrate_pages(struct list_head *from,
746 struct page *page2; 746 struct page *page2;
747 int swapwrite = current->flags & PF_SWAPWRITE; 747 int swapwrite = current->flags & PF_SWAPWRITE;
748 int rc; 748 int rc;
749 unsigned long flags;
750
751 local_irq_save(flags);
752 list_for_each_entry(page, from, lru)
753 __inc_zone_page_state(page, NR_ISOLATED_ANON +
754 page_is_file_cache(page));
755 local_irq_restore(flags);
756 749
757 if (!swapwrite) 750 if (!swapwrite)
758 current->flags |= PF_SWAPWRITE; 751 current->flags |= PF_SWAPWRITE;
@@ -878,8 +871,11 @@ static int do_move_page_to_node_array(struct mm_struct *mm,
878 goto put_and_set; 871 goto put_and_set;
879 872
880 err = isolate_lru_page(page); 873 err = isolate_lru_page(page);
881 if (!err) 874 if (!err) {
882 list_add_tail(&page->lru, &pagelist); 875 list_add_tail(&page->lru, &pagelist);
876 inc_zone_page_state(page, NR_ISOLATED_ANON +
877 page_is_file_cache(page));
878 }
883put_and_set: 879put_and_set:
884 /* 880 /*
885 * Either remove the duplicate refcount from 881 * Either remove the duplicate refcount from