summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/mmap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index 2ba27434e843..e3c365ff1b6a 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -573,8 +573,12 @@ again: remove_next = 1 + (end > next->vm_end);
*/
if (vma->anon_vma && (importer || start != vma->vm_start)) {
anon_vma = vma->anon_vma;
+ VM_BUG_ON(adjust_next && next->anon_vma &&
+ anon_vma != next->anon_vma);
+ } else if (adjust_next && next->anon_vma)
+ anon_vma = next->anon_vma;
+ if (anon_vma)
anon_vma_lock(anon_vma);
- }
if (root) {
flush_dcache_mmap_lock(mapping);