diff options
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 13 |
1 files changed, 1 insertions, 12 deletions
@@ -445,10 +445,8 @@ static void vma_link(struct mm_struct *mm, struct vm_area_struct *vma, | |||
445 | if (vma->vm_file) | 445 | if (vma->vm_file) |
446 | mapping = vma->vm_file->f_mapping; | 446 | mapping = vma->vm_file->f_mapping; |
447 | 447 | ||
448 | if (mapping) { | 448 | if (mapping) |
449 | spin_lock(&mapping->i_mmap_lock); | 449 | spin_lock(&mapping->i_mmap_lock); |
450 | vma->vm_truncate_count = mapping->truncate_count; | ||
451 | } | ||
452 | 450 | ||
453 | __vma_link(mm, vma, prev, rb_link, rb_parent); | 451 | __vma_link(mm, vma, prev, rb_link, rb_parent); |
454 | __vma_link_file(vma); | 452 | __vma_link_file(vma); |
@@ -558,16 +556,7 @@ again: remove_next = 1 + (end > next->vm_end); | |||
558 | if (!(vma->vm_flags & VM_NONLINEAR)) | 556 | if (!(vma->vm_flags & VM_NONLINEAR)) |
559 | root = &mapping->i_mmap; | 557 | root = &mapping->i_mmap; |
560 | spin_lock(&mapping->i_mmap_lock); | 558 | spin_lock(&mapping->i_mmap_lock); |
561 | if (importer && | ||
562 | vma->vm_truncate_count != next->vm_truncate_count) { | ||
563 | /* | ||
564 | * unmap_mapping_range might be in progress: | ||
565 | * ensure that the expanding vma is rescanned. | ||
566 | */ | ||
567 | importer->vm_truncate_count = 0; | ||
568 | } | ||
569 | if (insert) { | 559 | if (insert) { |
570 | insert->vm_truncate_count = vma->vm_truncate_count; | ||
571 | /* | 560 | /* |
572 | * Put into prio_tree now, so instantiated pages | 561 | * Put into prio_tree now, so instantiated pages |
573 | * are visible to arm/parisc __flush_dcache_page | 562 | * are visible to arm/parisc __flush_dcache_page |