summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2016-12-20 11:19:54 +0100
committerMichal Hocko <mhocko@suse.com>2016-12-20 11:19:54 +0100
commit0126174443e4ea4cc61865dfe3dabc84c8158f99 (patch)
tree914f6f15352494a13505a56f3e8eca84a45f0997
parentb4bc69806c22c37f63745fc8e05becd751929497 (diff)
mm/thp/pagecache: only withdraw page table after a successful deposit
The current code wrongly called withdraw in the error path. But we haven't depoisted the page table yet in the only error path in that function. So for now remove that withdraw completely. If we take that "out:" branch, we should have vmf->prealloc_pte already pointing to the allocated page table. Fixes: 953c66c2b22a304d ("mm: THP page cache support for ppc64") Link: http://lkml.kernel.org/r/20161212163428.6780-1-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Reported-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/memory.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 010dcbaa61f3..e8703222b598 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3008,13 +3008,6 @@ static int do_set_pmd(struct vm_fault *vmf, struct page *page)
ret = 0;
count_vm_event(THP_FILE_MAPPED);
out:
- /*
- * If we are going to fallback to pte mapping, do a
- * withdraw with pmd lock held.
- */
- if (arch_needs_pgtable_deposit() && ret == VM_FAULT_FALLBACK)
- vmf->prealloc_pte = pgtable_trans_huge_withdraw(vma->vm_mm,
- vmf->pmd);
spin_unlock(vmf->ptl);
return ret;
}