diff options
author | Richard Weinberger <richard@nod.at> | 2014-01-23 18:55:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 19:37:02 -0500 |
commit | 3b96d7db3b6dc99d207bca50037274d22e48dea5 (patch) | |
tree | 1387602443da709099ff8886591911dd8097a66f /fs/exec.c | |
parent | b88fae644e5e3922251a4b242f435f5e3b49c381 (diff) |
fs/exec.c: call arch_pick_mmap_layout() only once
Currently both setup_new_exec() and flush_old_exec() issue a call to
arch_pick_mmap_layout(). As setup_new_exec() and flush_old_exec() are
always called pairwise arch_pick_mmap_layout() is called twice.
This patch removes one call from setup_new_exec() to have it only called
once.
Signed-off-by: Richard Weinberger <richard@nod.at>
Tested-by: Pat Erley <pat-lkml@erley.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -842,7 +842,6 @@ static int exec_mmap(struct mm_struct *mm) | |||
842 | tsk->active_mm = mm; | 842 | tsk->active_mm = mm; |
843 | activate_mm(active_mm, mm); | 843 | activate_mm(active_mm, mm); |
844 | task_unlock(tsk); | 844 | task_unlock(tsk); |
845 | arch_pick_mmap_layout(mm); | ||
846 | if (old_mm) { | 845 | if (old_mm) { |
847 | up_read(&old_mm->mmap_sem); | 846 | up_read(&old_mm->mmap_sem); |
848 | BUG_ON(active_mm != old_mm); | 847 | BUG_ON(active_mm != old_mm); |