diff options
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -1673,9 +1673,7 @@ static void unmap_region(struct mm_struct *mm, | |||
1673 | lru_add_drain(); | 1673 | lru_add_drain(); |
1674 | tlb = tlb_gather_mmu(mm, 0); | 1674 | tlb = tlb_gather_mmu(mm, 0); |
1675 | update_hiwater_rss(mm); | 1675 | update_hiwater_rss(mm); |
1676 | spin_lock(&mm->page_table_lock); | 1676 | unmap_vmas(&tlb, vma, start, end, &nr_accounted, NULL); |
1677 | unmap_vmas(&tlb, mm, vma, start, end, &nr_accounted, NULL); | ||
1678 | spin_unlock(&mm->page_table_lock); | ||
1679 | vm_unacct_memory(nr_accounted); | 1677 | vm_unacct_memory(nr_accounted); |
1680 | free_pgtables(&tlb, vma, prev? prev->vm_end: FIRST_USER_ADDRESS, | 1678 | free_pgtables(&tlb, vma, prev? prev->vm_end: FIRST_USER_ADDRESS, |
1681 | next? next->vm_start: 0); | 1679 | next? next->vm_start: 0); |
@@ -1958,9 +1956,7 @@ void exit_mmap(struct mm_struct *mm) | |||
1958 | tlb = tlb_gather_mmu(mm, 1); | 1956 | tlb = tlb_gather_mmu(mm, 1); |
1959 | /* Don't update_hiwater_rss(mm) here, do_exit already did */ | 1957 | /* Don't update_hiwater_rss(mm) here, do_exit already did */ |
1960 | /* Use -1 here to ensure all VMAs in the mm are unmapped */ | 1958 | /* Use -1 here to ensure all VMAs in the mm are unmapped */ |
1961 | spin_lock(&mm->page_table_lock); | 1959 | end = unmap_vmas(&tlb, vma, 0, -1, &nr_accounted, NULL); |
1962 | end = unmap_vmas(&tlb, mm, vma, 0, -1, &nr_accounted, NULL); | ||
1963 | spin_unlock(&mm->page_table_lock); | ||
1964 | vm_unacct_memory(nr_accounted); | 1960 | vm_unacct_memory(nr_accounted); |
1965 | free_pgtables(&tlb, vma, FIRST_USER_ADDRESS, 0); | 1961 | free_pgtables(&tlb, vma, FIRST_USER_ADDRESS, 0); |
1966 | tlb_finish_mmu(tlb, 0, end); | 1962 | tlb_finish_mmu(tlb, 0, end); |