diff --git a/mm/mmap.c b/mm/mmap.c index 57824ec4c7d5..93a545ae983e 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -667,11 +667,10 @@ static void vma_link(struct mm_struct *mm, struct vm_area_struct *vma, { struct address_space *mapping = NULL; - if (vma->vm_file) + if (vma->vm_file) { mapping = vma->vm_file->f_mapping; - - if (mapping) mutex_lock(&mapping->i_mmap_mutex); + } __vma_link(mm, vma, prev, rb_link, rb_parent); __vma_link_file(vma);