diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mmap.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -2084,12 +2084,8 @@ void exit_mmap(struct mm_struct *mm) | |||
2084 | unsigned long end; | 2084 | unsigned long end; |
2085 | 2085 | ||
2086 | /* mm's last user has gone, and its about to be pulled down */ | 2086 | /* mm's last user has gone, and its about to be pulled down */ |
2087 | arch_exit_mmap(mm); | ||
2088 | mmu_notifier_release(mm); | 2087 | mmu_notifier_release(mm); |
2089 | 2088 | ||
2090 | if (!mm->mmap) /* Can happen if dup_mmap() received an OOM */ | ||
2091 | return; | ||
2092 | |||
2093 | if (mm->locked_vm) { | 2089 | if (mm->locked_vm) { |
2094 | vma = mm->mmap; | 2090 | vma = mm->mmap; |
2095 | while (vma) { | 2091 | while (vma) { |
@@ -2098,7 +2094,13 @@ void exit_mmap(struct mm_struct *mm) | |||
2098 | vma = vma->vm_next; | 2094 | vma = vma->vm_next; |
2099 | } | 2095 | } |
2100 | } | 2096 | } |
2097 | |||
2098 | arch_exit_mmap(mm); | ||
2099 | |||
2101 | vma = mm->mmap; | 2100 | vma = mm->mmap; |
2101 | if (!vma) /* Can happen if dup_mmap() received an OOM */ | ||
2102 | return; | ||
2103 | |||
2102 | lru_add_drain(); | 2104 | lru_add_drain(); |
2103 | flush_cache_mm(mm); | 2105 | flush_cache_mm(mm); |
2104 | tlb = tlb_gather_mmu(mm, 1); | 2106 | tlb = tlb_gather_mmu(mm, 1); |