rmap: drop support of non-linear mappings
We don't create non-linear mappings anymore. Let's drop code which handles them in rmap. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

父節點
1da4b35b00
當前提交
27ba0644ea
24
mm/mmap.c
24
mm/mmap.c
@@ -243,10 +243,7 @@ static void __remove_shared_vm_struct(struct vm_area_struct *vma,
|
||||
mapping_unmap_writable(mapping);
|
||||
|
||||
flush_dcache_mmap_lock(mapping);
|
||||
if (unlikely(vma->vm_flags & VM_NONLINEAR))
|
||||
list_del_init(&vma->shared.nonlinear);
|
||||
else
|
||||
vma_interval_tree_remove(vma, &mapping->i_mmap);
|
||||
vma_interval_tree_remove(vma, &mapping->i_mmap);
|
||||
flush_dcache_mmap_unlock(mapping);
|
||||
}
|
||||
|
||||
@@ -649,10 +646,7 @@ static void __vma_link_file(struct vm_area_struct *vma)
|
||||
atomic_inc(&mapping->i_mmap_writable);
|
||||
|
||||
flush_dcache_mmap_lock(mapping);
|
||||
if (unlikely(vma->vm_flags & VM_NONLINEAR))
|
||||
vma_nonlinear_insert(vma, &mapping->i_mmap_nonlinear);
|
||||
else
|
||||
vma_interval_tree_insert(vma, &mapping->i_mmap);
|
||||
vma_interval_tree_insert(vma, &mapping->i_mmap);
|
||||
flush_dcache_mmap_unlock(mapping);
|
||||
}
|
||||
}
|
||||
@@ -789,14 +783,11 @@ again: remove_next = 1 + (end > next->vm_end);
|
||||
|
||||
if (file) {
|
||||
mapping = file->f_mapping;
|
||||
if (!(vma->vm_flags & VM_NONLINEAR)) {
|
||||
root = &mapping->i_mmap;
|
||||
uprobe_munmap(vma, vma->vm_start, vma->vm_end);
|
||||
root = &mapping->i_mmap;
|
||||
uprobe_munmap(vma, vma->vm_start, vma->vm_end);
|
||||
|
||||
if (adjust_next)
|
||||
uprobe_munmap(next, next->vm_start,
|
||||
next->vm_end);
|
||||
}
|
||||
if (adjust_next)
|
||||
uprobe_munmap(next, next->vm_start, next->vm_end);
|
||||
|
||||
i_mmap_lock_write(mapping);
|
||||
if (insert) {
|
||||
@@ -3177,8 +3168,7 @@ static void vm_lock_mapping(struct mm_struct *mm, struct address_space *mapping)
|
||||
*
|
||||
* mmap_sem in write mode is required in order to block all operations
|
||||
* that could modify pagetables and free pages without need of
|
||||
* altering the vma layout (for example populate_range() with
|
||||
* nonlinear vmas). It's also needed in write mode to avoid new
|
||||
* altering the vma layout. It's also needed in write mode to avoid new
|
||||
* anon_vmas to be associated with existing vmas.
|
||||
*
|
||||
* A single task can't take more than one mm_take_all_locks() in a row
|
||||
|
Reference in New Issue
Block a user