diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2013-11-14 17:31:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-14 19:32:15 -0500 |
commit | c4088ebdca64c9a2e34a38177d2249805ede1f4b (patch) | |
tree | 9e761c697ad6fab039adb5280bf26fb41f8e17aa /mm/migrate.c | |
parent | cb900f41215447433cbc456d1c4294e858a84d7c (diff) |
mm: convert the rest to new page table lock api
Only trivial cases left. Let's convert them altogether.
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Tested-by: Alex Thorlton <athorlton@sgi.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "Eric W . Biederman" <ebiederm@xmission.com>
Cc: "Paul E . McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Dave Jones <davej@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Robin Holt <robinmholt@gmail.com>
Cc: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Hugh Dickins <hughd@google.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.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index 01f45cefa4cd..316e720a2023 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -1667,6 +1667,7 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm, | |||
1667 | unsigned long address, | 1667 | unsigned long address, |
1668 | struct page *page, int node) | 1668 | struct page *page, int node) |
1669 | { | 1669 | { |
1670 | spinlock_t *ptl; | ||
1670 | unsigned long haddr = address & HPAGE_PMD_MASK; | 1671 | unsigned long haddr = address & HPAGE_PMD_MASK; |
1671 | pg_data_t *pgdat = NODE_DATA(node); | 1672 | pg_data_t *pgdat = NODE_DATA(node); |
1672 | int isolated = 0; | 1673 | int isolated = 0; |
@@ -1706,9 +1707,9 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm, | |||
1706 | WARN_ON(PageLRU(new_page)); | 1707 | WARN_ON(PageLRU(new_page)); |
1707 | 1708 | ||
1708 | /* Recheck the target PMD */ | 1709 | /* Recheck the target PMD */ |
1709 | spin_lock(&mm->page_table_lock); | 1710 | ptl = pmd_lock(mm, pmd); |
1710 | if (unlikely(!pmd_same(*pmd, entry))) { | 1711 | if (unlikely(!pmd_same(*pmd, entry))) { |
1711 | spin_unlock(&mm->page_table_lock); | 1712 | spin_unlock(ptl); |
1712 | 1713 | ||
1713 | /* Reverse changes made by migrate_page_copy() */ | 1714 | /* Reverse changes made by migrate_page_copy() */ |
1714 | if (TestClearPageActive(new_page)) | 1715 | if (TestClearPageActive(new_page)) |
@@ -1753,7 +1754,7 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm, | |||
1753 | * before it's fully transferred to the new page. | 1754 | * before it's fully transferred to the new page. |
1754 | */ | 1755 | */ |
1755 | mem_cgroup_end_migration(memcg, page, new_page, true); | 1756 | mem_cgroup_end_migration(memcg, page, new_page, true); |
1756 | spin_unlock(&mm->page_table_lock); | 1757 | spin_unlock(ptl); |
1757 | 1758 | ||
1758 | unlock_page(new_page); | 1759 | unlock_page(new_page); |
1759 | unlock_page(page); | 1760 | unlock_page(page); |