summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-01-09 17:36:54 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2013-01-09 17:36:54 +0100
commite53289c0c5e5a24e29e571eba7af05c845c10890 (patch)
treefd8852edc6b91152f30b8a7eb0e75fc5ca6750af
parentcred: Remove tgcred pointer from struct cred (diff)
downloadlinux-e53289c0c5e5a24e29e571eba7af05c845c10890.tar.xz
linux-e53289c0c5e5a24e29e571eba7af05c845c10890.zip
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 d10e63f29488 ("mm: numa: Create basic numa page hinting infrastructure"). Put it back. Reported-by: Dave Jones <davej@redhat.com> Debugged-by: Hillf Danton <dhillf@gmail.com> Acked-by: Andrea Arcangeli <aarcange@redhat.com> Acked-by: Mel Gorman <mgorman@suse.de> Cc: Kirill Shutemov <kirill@shutemov.name> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--mm/memory.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 49fb1cf08611..bb1369f7b9b4 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3711,6 +3711,14 @@ retry:
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);