Skip to content

Commit

Permalink
mmap: remove unnecessary lock from __vma_link
Browse files Browse the repository at this point in the history
There's no anon-vma related mangling happening inside __vma_link anymore
so no need of anon_vma locking there.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andrea Arcangeli authored and Linus Torvalds committed Aug 10, 2010
1 parent ff36b80 commit 5e549e9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions mm/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,12 +452,10 @@ static void vma_link(struct mm_struct *mm, struct vm_area_struct *vma,
spin_lock(&mapping->i_mmap_lock);
vma->vm_truncate_count = mapping->truncate_count;
}
vma_lock_anon_vma(vma);

__vma_link(mm, vma, prev, rb_link, rb_parent);
__vma_link_file(vma);

vma_unlock_anon_vma(vma);
if (mapping)
spin_unlock(&mapping->i_mmap_lock);

Expand Down

0 comments on commit 5e549e9

Please sign in to comment.