Skip to content

Commit

Permalink
hugetlb: use helper {huge_pte|pmd}_lock()
Browse files Browse the repository at this point in the history
Use helper huge_pte_lock and pmd_lock to simplify the code. No functional
change intended.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Miaohe Lin <[email protected]>
Reviewed-by: Muchun Song <[email protected]>
Cc: Mike Kravetz <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
MiaoheLin authored and akpm00 committed Sep 12, 2022
1 parent 1039568 commit bcc6654
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bcc6654

Please sign in to comment.