From 16d2326efdf8b6dbd839b867f76de2b21cb2d3f5 Mon Sep 17 00:00:00 2001 From: Richard Weinberger Date: Fri, 3 Jan 2014 14:10:32 +1100 Subject: [PATCH] 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 Cc: Al Viro Signed-off-by: Andrew Morton --- fs/exec.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/exec.c b/fs/exec.c index 493b102a27c1..4d117e9c0571 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1108,8 +1108,6 @@ EXPORT_SYMBOL(would_dump); void setup_new_exec(struct linux_binprm * bprm) { - arch_pick_mmap_layout(current->mm); - /* This is the point of no return */ current->sas_ss_sp = current->sas_ss_size = 0; -- 2.39.5