summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2013-06-06 09:20:34 +0200
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-06-20 08:55:06 +0200
commit8663890a9e9278623d20c67aa9fbeeb31ff3be97 (patch)
tree25d4a836ceaba9530ae01d2fd390d5450b0b260a /mm
parentMerge tag 'acpi-3.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ra... (diff)
downloadlinux-8663890a9e9278623d20c67aa9fbeeb31ff3be97.tar.xz
linux-8663890a9e9278623d20c67aa9fbeeb31ff3be97.zip
mm/thp: use the correct function when updating access flags
We should use pmdp_set_access_flags to update access flags. Archs like powerpc use extra checks(_PAGE_BUSY) when updating a hugepage PTE. A set_pmd_at doesn't do those checks. We should use set_pmd_at only when updating a none hugepage PTE. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Andrea Arcangeli <aarcange@redhat.com>a Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/huge_memory.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 362c329b83fe..dab90fd67298 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1265,7 +1265,9 @@ struct page *follow_trans_huge_pmd(struct vm_area_struct *vma,
* young bit, instead of the current set_pmd_at.
*/
_pmd = pmd_mkyoung(pmd_mkdirty(*pmd));
- set_pmd_at(mm, addr & HPAGE_PMD_MASK, pmd, _pmd);
+ if (pmdp_set_access_flags(vma, addr & HPAGE_PMD_MASK,
+ pmd, _pmd, 1))
+ update_mmu_cache_pmd(vma, addr, pmd);
}
if ((flags & FOLL_MLOCK) && (vma->vm_flags & VM_LOCKED)) {
if (page->mapping && trylock_page(page)) {