aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/mmap.c')
-rw-r--r--mm/mmap.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index adb12527fd0..40d49986e71 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1903,17 +1903,17 @@ static void unmap_region(struct mm_struct *mm,
1903 unsigned long start, unsigned long end) 1903 unsigned long start, unsigned long end)
1904{ 1904{
1905 struct vm_area_struct *next = prev? prev->vm_next: mm->mmap; 1905 struct vm_area_struct *next = prev? prev->vm_next: mm->mmap;
1906 struct mmu_gather *tlb; 1906 struct mmu_gather tlb;
1907 unsigned long nr_accounted = 0; 1907 unsigned long nr_accounted = 0;
1908 1908
1909 lru_add_drain(); 1909 lru_add_drain();
1910 tlb = tlb_gather_mmu(mm, 0); 1910 tlb_gather_mmu(&tlb, mm, 0);
1911 update_hiwater_rss(mm); 1911 update_hiwater_rss(mm);
1912 unmap_vmas(&tlb, vma, start, end, &nr_accounted, NULL); 1912 unmap_vmas(&tlb, vma, start, end, &nr_accounted, NULL);
1913 vm_unacct_memory(nr_accounted); 1913 vm_unacct_memory(nr_accounted);
1914 free_pgtables(tlb, vma, prev? prev->vm_end: FIRST_USER_ADDRESS, 1914 free_pgtables(&tlb, vma, prev ? prev->vm_end : FIRST_USER_ADDRESS,
1915 next? next->vm_start: 0); 1915 next ? next->vm_start : 0);
1916 tlb_finish_mmu(tlb, start, end); 1916 tlb_finish_mmu(&tlb, start, end);
1917} 1917}
1918 1918
1919/* 1919/*
@@ -2255,7 +2255,7 @@ EXPORT_SYMBOL(do_brk);
2255/* Release all mmaps. */ 2255/* Release all mmaps. */
2256void exit_mmap(struct mm_struct *mm) 2256void exit_mmap(struct mm_struct *mm)
2257{ 2257{
2258 struct mmu_gather *tlb; 2258 struct mmu_gather tlb;
2259 struct vm_area_struct *vma; 2259 struct vm_area_struct *vma;
2260 unsigned long nr_accounted = 0; 2260 unsigned long nr_accounted = 0;
2261 unsigned long end; 2261 unsigned long end;
@@ -2280,14 +2280,14 @@ void exit_mmap(struct mm_struct *mm)
2280 2280
2281 lru_add_drain(); 2281 lru_add_drain();
2282 flush_cache_mm(mm); 2282 flush_cache_mm(mm);
2283 tlb = tlb_gather_mmu(mm, 1); 2283 tlb_gather_mmu(&tlb, mm, 1);
2284 /* update_hiwater_rss(mm) here? but nobody should be looking */ 2284 /* update_hiwater_rss(mm) here? but nobody should be looking */
2285 /* Use -1 here to ensure all VMAs in the mm are unmapped */ 2285 /* Use -1 here to ensure all VMAs in the mm are unmapped */
2286 end = unmap_vmas(&tlb, vma, 0, -1, &nr_accounted, NULL); 2286 end = unmap_vmas(&tlb, vma, 0, -1, &nr_accounted, NULL);
2287 vm_unacct_memory(nr_accounted); 2287 vm_unacct_memory(nr_accounted);
2288 2288
2289 free_pgtables(tlb, vma, FIRST_USER_ADDRESS, 0); 2289 free_pgtables(&tlb, vma, FIRST_USER_ADDRESS, 0);
2290 tlb_finish_mmu(tlb, 0, end); 2290 tlb_finish_mmu(&tlb, 0, end);
2291 2291
2292 /* 2292 /*
2293 * Walk the list again, actually closing and freeing it, 2293 * Walk the list again, actually closing and freeing it,