Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b96d7db authored by Richard Weinberger's avatar Richard Weinberger Committed by Linus Torvalds
Browse files

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: default avatarRichard Weinberger <richard@nod.at>
Tested-by: default avatarPat Erley <pat-lkml@erley.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b88fae64
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -842,7 +842,6 @@ static int exec_mmap(struct mm_struct *mm)
	tsk->active_mm = mm;
	tsk->active_mm = mm;
	activate_mm(active_mm, mm);
	activate_mm(active_mm, mm);
	task_unlock(tsk);
	task_unlock(tsk);
	arch_pick_mmap_layout(mm);
	if (old_mm) {
	if (old_mm) {
		up_read(&old_mm->mmap_sem);
		up_read(&old_mm->mmap_sem);
		BUG_ON(active_mm != old_mm);
		BUG_ON(active_mm != old_mm);