diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2023-10-18 23:32:58 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-10-18 23:32:58 +0200 |
commit | 5ef8f1b2b4d9bd02e4104b9255351fb9279b1b4e (patch) | |
tree | 415dc49e56338e498bff9a3b0c5b99b049890e14 /mm/memory.c | |
parent | mm/ksm: document pages_skipped sysfs knob (diff) | |
parent | selftests/clone3: Fix broken test under !CONFIG_TIME_NS (diff) | |
download | linux-5ef8f1b2b4d9bd02e4104b9255351fb9279b1b4e.tar.xz linux-5ef8f1b2b4d9bd02e4104b9255351fb9279b1b4e.zip |
Merge mm-hotfixes-stable into mm-stable to pick up depended-upon changes.
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/mm/memory.c b/mm/memory.c index 7ca16ed67634..2d209bc4d18c 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1691,7 +1691,7 @@ static void unmap_single_vma(struct mmu_gather *tlb, if (vma->vm_file) { zap_flags_t zap_flags = details ? details->zap_flags : 0; - __unmap_hugepage_range_final(tlb, vma, start, end, + __unmap_hugepage_range(tlb, vma, start, end, NULL, zap_flags); } } else @@ -1736,8 +1736,12 @@ void unmap_vmas(struct mmu_gather *tlb, struct ma_state *mas, start_addr, end_addr); mmu_notifier_invalidate_range_start(&range); do { - unmap_single_vma(tlb, vma, start_addr, end_addr, &details, + unsigned long start = start_addr; + unsigned long end = end_addr; + hugetlb_zap_begin(vma, &start, &end); + unmap_single_vma(tlb, vma, start, end, &details, mm_wr_locked); + hugetlb_zap_end(vma, &details); } while ((vma = mas_find(mas, tree_end - 1)) != NULL); mmu_notifier_invalidate_range_end(&range); } @@ -1761,9 +1765,7 @@ void zap_page_range_single(struct vm_area_struct *vma, unsigned long address, lru_add_drain(); mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, vma->vm_mm, address, end); - if (is_vm_hugetlb_page(vma)) - adjust_range_if_pmd_sharing_possible(vma, &range.start, - &range.end); + hugetlb_zap_begin(vma, &range.start, &range.end); tlb_gather_mmu(&tlb, vma->vm_mm); update_hiwater_rss(vma->vm_mm); mmu_notifier_invalidate_range_start(&range); @@ -1774,6 +1776,7 @@ void zap_page_range_single(struct vm_area_struct *vma, unsigned long address, unmap_single_vma(&tlb, vma, address, end, details, false); mmu_notifier_invalidate_range_end(&range); tlb_finish_mmu(&tlb); + hugetlb_zap_end(vma, details); } /** |