Commit 45edcd45 authored by Luis Henriques's avatar Luis Henriques

Revert "mm/hugetlb: use pmd_page() in follow_huge_pmd()"

This reverts commit 65342eab which is
commit 97534127 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: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 854cb316
......@@ -3723,7 +3723,8 @@ follow_huge_pmd(struct mm_struct *mm, unsigned long address,
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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment