mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
mm: cleanup *pte_alloc* interfaces
There are few things about *pte_alloc*() helpers worth cleaning up: - 'vma' argument is unused, let's drop it; - most __pte_alloc() callers do speculative check for pmd_none(), before taking ptl: let's introduce pte_alloc() macro which does the check. The only direct user of __pte_alloc left is userfaultfd, which has different expectation about atomicity wrt pmd. - pte_alloc_map() and pte_alloc_map_lock() are redefined using pte_alloc(). [[email protected]: fix build for arm64 hugetlbpage] [[email protected]: fix arch/arm/mm/mmu.c some more] Signed-off-by: Kirill A. Shutemov <[email protected]> Cc: Dave Hansen <[email protected]> Signed-off-by: Sudeep Holla <[email protected]> Acked-by: Kirill A. Shutemov <[email protected]> Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
5057dcd0f1
commit
3ed3a4f0dd
16 changed files with 27 additions and 32 deletions
|
|
@ -213,8 +213,7 @@ unsigned long move_page_tables(struct vm_area_struct *vma,
|
|||
continue;
|
||||
VM_BUG_ON(pmd_trans_huge(*old_pmd));
|
||||
}
|
||||
if (pmd_none(*new_pmd) && __pte_alloc(new_vma->vm_mm, new_vma,
|
||||
new_pmd, new_addr))
|
||||
if (pte_alloc(new_vma->vm_mm, new_pmd, new_addr))
|
||||
break;
|
||||
next = (new_addr + PMD_SIZE) & PMD_MASK;
|
||||
if (extent > next - new_addr)
|
||||
|
|
|
|||
Loading…
Reference in a new issue