From: Al Viro Date: Mon, 5 Mar 2012 18:35:49 +0000 (-0500) Subject: VM: can't go through the inner loop in unmap_vmas() more than once... X-Git-Tag: MMI-PSA29.97-13-9~17246^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8b2a12382ccc9df31b27dac37fe04dffe088b57c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git VM: can't go through the inner loop in unmap_vmas() more than once... Signed-off-by: Al Viro --- diff --git a/mm/memory.c b/mm/memory.c index 1b6712a9720d..f2317c85704e 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1354,7 +1354,7 @@ unsigned long unmap_vmas(struct mmu_gather *tlb, if (unlikely(is_pfn_mapping(vma))) untrack_pfn_vma(vma, 0, 0); - while (start != end) { + if (start != end) { if (unlikely(is_vm_hugetlb_page(vma))) { /* * It is undesirable to test vma->vm_file as it @@ -1371,8 +1371,8 @@ unsigned long unmap_vmas(struct mmu_gather *tlb, unmap_hugepage_range(vma, start, end, NULL); } else unmap_page_range(tlb, vma, start, end, details); - start = end; } + start = end; } mmu_notifier_invalidate_range_end(mm, start_addr, end_addr);