summaryrefslogtreecommitdiff
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2022-09-01 15:00:25 +0300
committerAndrew Morton <akpm@linux-foundation.org>2022-09-12 06:26:09 +0300
commitbcc665436fe4648550ed4fd3345c7106b5da35b0 (patch)
treeb703d555575d6c68b117f98ea14aafba44a814ba /mm/hugetlb.c
parent103956805c250ccef3d2a54a0a2e3354291cdd85 (diff)
downloadlinux-bcc665436fe4648550ed4fd3345c7106b5da35b0.tar.xz
hugetlb: use helper {huge_pte|pmd}_lock()
Use helper huge_pte_lock and pmd_lock to simplify the code. No functional change intended. Link: https://lkml.kernel.org/r/20220901120030.63318-6-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: Muchun Song <songmuchun@bytedance.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r--mm/hugetlb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 4d2efdfbd09d..cc1d85749766 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -6049,8 +6049,7 @@ int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm,
page_in_pagecache = true;
}
- ptl = huge_pte_lockptr(h, dst_mm, dst_pte);
- spin_lock(ptl);
+ ptl = huge_pte_lock(h, dst_mm, dst_pte);
/*
* Recheck the i_size after holding PT lock to make sure not