Commit 584cff54 authored by Kautuk Consul's avatar Kautuk Consul Committed by Linus Torvalds

mm/mmap.c: eliminate the ret variable from mm_take_all_locks()

The ret variable is really not needed in mm_take_all_locks().
Signed-off-by: default avatarKautuk Consul <consul.kautuk@gmail.com>
Reviewed-by: default avatarMichal Hocko <mhocko@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 09f363c7
...@@ -2558,7 +2558,6 @@ int mm_take_all_locks(struct mm_struct *mm) ...@@ -2558,7 +2558,6 @@ int mm_take_all_locks(struct mm_struct *mm)
{ {
struct vm_area_struct *vma; struct vm_area_struct *vma;
struct anon_vma_chain *avc; struct anon_vma_chain *avc;
int ret = -EINTR;
BUG_ON(down_read_trylock(&mm->mmap_sem)); BUG_ON(down_read_trylock(&mm->mmap_sem));
...@@ -2579,13 +2578,11 @@ int mm_take_all_locks(struct mm_struct *mm) ...@@ -2579,13 +2578,11 @@ int mm_take_all_locks(struct mm_struct *mm)
vm_lock_anon_vma(mm, avc->anon_vma); vm_lock_anon_vma(mm, avc->anon_vma);
} }
ret = 0; return 0;
out_unlock: out_unlock:
if (ret)
mm_drop_all_locks(mm); mm_drop_all_locks(mm);
return -EINTR;
return ret;
} }
static void vm_unlock_anon_vma(struct anon_vma *anon_vma) static void vm_unlock_anon_vma(struct anon_vma *anon_vma)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment