diff --git a/mm/memory.c b/mm/memory.c index 054da820d99a..e2f20c6bf83c 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -410,9 +410,7 @@ void free_pgtables(struct mmu_gather *tlb, struct vm_area_struct *vma, * Hide vma from rmap and truncate_pagecache before freeing * pgtables */ - vm_write_begin(vma); unlink_anon_vmas(vma); - vm_write_end(vma); unlink_file_vma(vma); if (is_vm_hugetlb_page(vma)) { @@ -426,9 +424,7 @@ void free_pgtables(struct mmu_gather *tlb, struct vm_area_struct *vma, && !is_vm_hugetlb_page(next)) { vma = next; next = vma->vm_next; - vm_write_begin(vma); unlink_anon_vmas(vma); - vm_write_end(vma); unlink_file_vma(vma); } free_pgd_range(tlb, addr, vma->vm_end,