Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1502811
| From | "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] mm/hugetlb: Use huge_pte_lock instead of opencoding the lock |
| Date | 2016-10-18 11:10 +0200 |
| Message-ID | <styzg-83y-11@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
No functional change by this patch.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
mm/hugetlb.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index da8fbd02b92e..2ff57dfb772d 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3648,8 +3648,7 @@ static int hugetlb_no_page(struct mm_struct *mm, struct vm_area_struct *vma,
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;
@@ -4266,8 +4265,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));
--
2.10.1
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] mm/hugetlb: Use huge_pte_lock instead of opencoding the lock "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> - 2016-10-18 11:10 +0200
csiph-web