Commit e53289c0 authored by Linus Torvalds's avatar Linus Torvalds

mm: reinstante dropped pmd_trans_splitting() check

The check for a pmd being in the process of being split was dropped by
mistake by commit d10e63f2 ("mm: numa: Create basic numa page
hinting infrastructure"). Put it back.
Reported-by: default avatarDave Jones <davej@redhat.com>
Debugged-by: default avatarHillf Danton <dhillf@gmail.com>
Acked-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
Acked-by: default avatarMel Gorman <mgorman@suse.de>
Cc: Kirill Shutemov <kirill@shutemov.name>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 08c097fc
......@@ -3711,6 +3711,14 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
if (pmd_trans_huge(orig_pmd)) {
unsigned int dirty = flags & FAULT_FLAG_WRITE;
/*
* If the pmd is splitting, return and retry the
* the fault. Alternative: wait until the split
* is done, and goto retry.
*/
if (pmd_trans_splitting(orig_pmd))
return 0;
if (pmd_numa(orig_pmd))
return do_huge_pmd_numa_page(mm, vma, address,
orig_pmd, pmd);
......
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