summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorLuis Henriques <luis.henriques@canonical.com>2015-05-18 11:01:04 +0100
committerLuis Henriques <luis.henriques@canonical.com>2015-05-20 13:25:29 +0100
commit45edcd45af325f39d985f3d0ecee1c71376d8c34 (patch)
treee1b7abe5c394dd9ba4c662711161f0a3cd881e5b /mm
parent854cb3164f288919c8ff309e457ba0c7973e3d3f (diff)
downloadlwn-45edcd45af325f39d985f3d0ecee1c71376d8c34.tar.gz
lwn-45edcd45af325f39d985f3d0ecee1c71376d8c34.zip
Revert "mm/hugetlb: use pmd_page() in follow_huge_pmd()"
This reverts commit 65342eab7baa43fb7852aafbe99e54daf2cd6420 which is commit 97534127012f0e396eddea4691f4c9b170aed74b upstream. This is being reverted because it fixes a regression that was introduced in 4.0 and does not affect 3.16 kernel. Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Hugh Dickins <hughd@google.com> Cc: Michal Hocko <mhocko@suse.cz> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: David Rientjes <rientjes@google.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'mm')
-rw-r--r--mm/hugetlb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 1e080a06e6ba..5f217e906ff9 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3723,7 +3723,8 @@ retry:
if (!pmd_huge(*pmd))
goto out;
if (pmd_present(*pmd)) {
- page = pmd_page(*pmd) + ((address & ~PMD_MASK) >> PAGE_SHIFT);
+ page = pte_page(*(pte_t *)pmd) +
+ ((address & ~PMD_MASK) >> PAGE_SHIFT);
if (flags & FOLL_GET)
get_page(page);
} else {