Loading mm/mmap.c +7 −7 Original line number Diff line number Diff line Loading @@ -3178,10 +3178,9 @@ void exit_mmap(struct mm_struct *mm) (void)__oom_reap_task_mm(mm); set_bit(MMF_OOM_SKIP, &mm->flags); down_write(&mm->mmap_sem); up_write(&mm->mmap_sem); } down_write(&mm->mmap_sem); if (mm->locked_vm) { vma = mm->mmap; while (vma) { Loading @@ -3194,8 +3193,11 @@ void exit_mmap(struct mm_struct *mm) arch_exit_mmap(mm); vma = mm->mmap; if (!vma) /* Can happen if dup_mmap() received an OOM */ if (!vma) { /* Can happen if dup_mmap() received an OOM */ up_write(&mm->mmap_sem);; return; } lru_add_drain(); flush_cache_mm(mm); Loading @@ -3206,16 +3208,14 @@ void exit_mmap(struct mm_struct *mm) free_pgtables(&tlb, vma, FIRST_USER_ADDRESS, USER_PGTABLES_CEILING); tlb_finish_mmu(&tlb, 0, -1); /* * Walk the list again, actually closing and freeing it, * with preemption enabled, without holding any MM locks. */ /* Walk the list again, actually closing and freeing it. */ while (vma) { if (vma->vm_flags & VM_ACCOUNT) nr_accounted += vma_pages(vma); vma = remove_vma(vma); cond_resched(); } up_write(&mm->mmap_sem); vm_unacct_memory(nr_accounted); } Loading Loading
mm/mmap.c +7 −7 Original line number Diff line number Diff line Loading @@ -3178,10 +3178,9 @@ void exit_mmap(struct mm_struct *mm) (void)__oom_reap_task_mm(mm); set_bit(MMF_OOM_SKIP, &mm->flags); down_write(&mm->mmap_sem); up_write(&mm->mmap_sem); } down_write(&mm->mmap_sem); if (mm->locked_vm) { vma = mm->mmap; while (vma) { Loading @@ -3194,8 +3193,11 @@ void exit_mmap(struct mm_struct *mm) arch_exit_mmap(mm); vma = mm->mmap; if (!vma) /* Can happen if dup_mmap() received an OOM */ if (!vma) { /* Can happen if dup_mmap() received an OOM */ up_write(&mm->mmap_sem);; return; } lru_add_drain(); flush_cache_mm(mm); Loading @@ -3206,16 +3208,14 @@ void exit_mmap(struct mm_struct *mm) free_pgtables(&tlb, vma, FIRST_USER_ADDRESS, USER_PGTABLES_CEILING); tlb_finish_mmu(&tlb, 0, -1); /* * Walk the list again, actually closing and freeing it, * with preemption enabled, without holding any MM locks. */ /* Walk the list again, actually closing and freeing it. */ while (vma) { if (vma->vm_flags & VM_ACCOUNT) nr_accounted += vma_pages(vma); vma = remove_vma(vma); cond_resched(); } up_write(&mm->mmap_sem); vm_unacct_memory(nr_accounted); } Loading