summaryrefslogtreecommitdiffstats
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2016-12-12 16:41:59 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-12 18:55:07 -0800
commit8bea805207500068b70778b707299a9b5920ca72 (patch)
tree72256febca29d5b0d0ddd1ae4015756a97ebc98b /mm/hugetlb.c
parent3999f52e3198e76607446ab1a4610c1ddc406c56 (diff)
downloadop-kernel-dev-8bea805207500068b70778b707299a9b5920ca72.zip
op-kernel-dev-8bea805207500068b70778b707299a9b5920ca72.tar.gz
mm/hugetlb.c: use huge_pte_lock instead of opencoding the lock
No functional change by this patch. Link: http://lkml.kernel.org/r/20161018090234.22574-1-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r--mm/hugetlb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 23aec01..c12296f 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3713,8 +3713,7 @@ retry:
vma_end_reservation(h, vma, address);
}
- ptl = huge_pte_lockptr(h, mm, ptep);
- spin_lock(ptl);
+ ptl = huge_pte_lock(h, mm, ptep);
size = i_size_read(mapping->host) >> huge_page_shift(h);
if (idx >= size)
goto backout;
@@ -4332,8 +4331,7 @@ pte_t *huge_pmd_share(struct mm_struct *mm, unsigned long addr, pud_t *pud)
if (!spte)
goto out;
- ptl = huge_pte_lockptr(hstate_vma(vma), mm, spte);
- spin_lock(ptl);
+ ptl = huge_pte_lock(hstate_vma(vma), mm, spte);
if (pud_none(*pud)) {
pud_populate(mm, pud,
(pmd_t *)((unsigned long)spte & PAGE_MASK));
OpenPOWER on IntegriCloud