aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/mmap.c')
-rw-r--r--mm/mmap.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index a65efd4db3e1..3c0061f744f5 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2558,7 +2558,6 @@ int mm_take_all_locks(struct mm_struct *mm)
2558{ 2558{
2559 struct vm_area_struct *vma; 2559 struct vm_area_struct *vma;
2560 struct anon_vma_chain *avc; 2560 struct anon_vma_chain *avc;
2561 int ret = -EINTR;
2562 2561
2563 BUG_ON(down_read_trylock(&mm->mmap_sem)); 2562 BUG_ON(down_read_trylock(&mm->mmap_sem));
2564 2563
@@ -2579,13 +2578,11 @@ int mm_take_all_locks(struct mm_struct *mm)
2579 vm_lock_anon_vma(mm, avc->anon_vma); 2578 vm_lock_anon_vma(mm, avc->anon_vma);
2580 } 2579 }
2581 2580
2582 ret = 0; 2581 return 0;
2583 2582
2584out_unlock: 2583out_unlock:
2585 if (ret) 2584 mm_drop_all_locks(mm);
2586 mm_drop_all_locks(mm); 2585 return -EINTR;
2587
2588 return ret;
2589} 2586}
2590 2587
2591static void vm_unlock_anon_vma(struct anon_vma *anon_vma) 2588static void vm_unlock_anon_vma(struct anon_vma *anon_vma)