Revert "mm: protect SPF handler against anon_vma changes"

This reverts commit ff6cfddf7a.

Bug: 128240262
Change-Id: I317785d46d335aab974e194e5ea0d744513baecd
Signed-off-by: Minchan Kim <minchan@google.com>
[dereference23: Forward port to msm-5.4]
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
This commit is contained in:
Minchan Kim 2019-03-11 11:41:40 +09:00 • committed by Alexander Winkowski
commit a43fdd54d4
No known key found for this signature in database
GPG key ID: 72762A66704CDE44

View file

@ -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,