diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2011-06-24 17:16:40 +0900 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2011-06-24 17:16:40 +0900 |
| commit | 20733d59d5763ecd96276f868c1f39e677b3b4e2 (patch) | |
| tree | 89177676a2a45afa97595ce1827630aa131c51e2 /mm/mmap.c | |
| parent | 75e1b6a84f7e2186e843da94751b6d175caf9209 (diff) | |
| parent | 17e8c4e1ebf139743e3830439fa65fd906af4a43 (diff) | |
Merge branch 'fbdev/stable-updates'
Diffstat (limited to 'mm/mmap.c')
| -rw-r--r-- | mm/mmap.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/mm/mmap.c b/mm/mmap.c index bbdc9af5e11..d49736ff8a8 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -906,14 +906,7 @@ struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *vma) if (anon_vma) return anon_vma; try_prev: - /* - * It is potentially slow to have to call find_vma_prev here. - * But it's only on the first write fault on the vma, not - * every time, and we could devise a way to avoid it later - * (e.g. stash info in next's anon_vma_node when assigning - * an anon_vma, or when trying vma_merge). Another time. - */ - BUG_ON(find_vma_prev(vma->vm_mm, vma->vm_start, &near) != vma); + near = vma->vm_prev; if (!near) goto none; @@ -2044,9 +2037,10 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len) return -EINVAL; /* Find the first overlapping VMA */ - vma = find_vma_prev(mm, start, &prev); + vma = find_vma(mm, start); if (!vma) return 0; + prev = vma->vm_prev; /* we have start < vma->vm_end */ /* if it doesn't overlap, we have nothing.. */ |
