diff options
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r-- | mm/huge_memory.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index b6a34b32d8ac..c314a362c167 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c | |||
@@ -793,11 +793,13 @@ out_unlock: | |||
793 | pte_free(mm, pgtable); | 793 | pte_free(mm, pgtable); |
794 | } | 794 | } |
795 | 795 | ||
796 | vm_fault_t vmf_insert_pfn_pmd(struct vm_area_struct *vma, unsigned long addr, | 796 | vm_fault_t vmf_insert_pfn_pmd(struct vm_fault *vmf, pfn_t pfn, bool write) |
797 | pmd_t *pmd, pfn_t pfn, bool write) | ||
798 | { | 797 | { |
798 | unsigned long addr = vmf->address & PMD_MASK; | ||
799 | struct vm_area_struct *vma = vmf->vma; | ||
799 | pgprot_t pgprot = vma->vm_page_prot; | 800 | pgprot_t pgprot = vma->vm_page_prot; |
800 | pgtable_t pgtable = NULL; | 801 | pgtable_t pgtable = NULL; |
802 | |||
801 | /* | 803 | /* |
802 | * If we had pmd_special, we could avoid all these restrictions, | 804 | * If we had pmd_special, we could avoid all these restrictions, |
803 | * but we need to be consistent with PTEs and architectures that | 805 | * but we need to be consistent with PTEs and architectures that |
@@ -820,7 +822,7 @@ vm_fault_t vmf_insert_pfn_pmd(struct vm_area_struct *vma, unsigned long addr, | |||
820 | 822 | ||
821 | track_pfn_insert(vma, &pgprot, pfn); | 823 | track_pfn_insert(vma, &pgprot, pfn); |
822 | 824 | ||
823 | insert_pfn_pmd(vma, addr, pmd, pfn, pgprot, write, pgtable); | 825 | insert_pfn_pmd(vma, addr, vmf->pmd, pfn, pgprot, write, pgtable); |
824 | return VM_FAULT_NOPAGE; | 826 | return VM_FAULT_NOPAGE; |
825 | } | 827 | } |
826 | EXPORT_SYMBOL_GPL(vmf_insert_pfn_pmd); | 828 | EXPORT_SYMBOL_GPL(vmf_insert_pfn_pmd); |
@@ -869,10 +871,12 @@ out_unlock: | |||
869 | spin_unlock(ptl); | 871 | spin_unlock(ptl); |
870 | } | 872 | } |
871 | 873 | ||
872 | vm_fault_t vmf_insert_pfn_pud(struct vm_area_struct *vma, unsigned long addr, | 874 | vm_fault_t vmf_insert_pfn_pud(struct vm_fault *vmf, pfn_t pfn, bool write) |
873 | pud_t *pud, pfn_t pfn, bool write) | ||
874 | { | 875 | { |
876 | unsigned long addr = vmf->address & PUD_MASK; | ||
877 | struct vm_area_struct *vma = vmf->vma; | ||
875 | pgprot_t pgprot = vma->vm_page_prot; | 878 | pgprot_t pgprot = vma->vm_page_prot; |
879 | |||
876 | /* | 880 | /* |
877 | * If we had pud_special, we could avoid all these restrictions, | 881 | * If we had pud_special, we could avoid all these restrictions, |
878 | * but we need to be consistent with PTEs and architectures that | 882 | * but we need to be consistent with PTEs and architectures that |
@@ -889,7 +893,7 @@ vm_fault_t vmf_insert_pfn_pud(struct vm_area_struct *vma, unsigned long addr, | |||
889 | 893 | ||
890 | track_pfn_insert(vma, &pgprot, pfn); | 894 | track_pfn_insert(vma, &pgprot, pfn); |
891 | 895 | ||
892 | insert_pfn_pud(vma, addr, pud, pfn, pgprot, write); | 896 | insert_pfn_pud(vma, addr, vmf->pud, pfn, pgprot, write); |
893 | return VM_FAULT_NOPAGE; | 897 | return VM_FAULT_NOPAGE; |
894 | } | 898 | } |
895 | EXPORT_SYMBOL_GPL(vmf_insert_pfn_pud); | 899 | EXPORT_SYMBOL_GPL(vmf_insert_pfn_pud); |