]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
fs/exec.c: call arch_pick_mmap_layout() only once
authorRichard Weinberger <richard@nod.at>
Fri, 3 Jan 2014 03:10:32 +0000 (14:10 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 3 Jan 2014 03:10:32 +0000 (14:10 +1100)
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>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/exec.c

index 493b102a27c186b5fb9fb014437dc19ab1657155..4d117e9c0571770f3f2653671038ab0289ed8bb1 100644 (file)
--- 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;