exec: consolidate 2 fast-paths
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 17 Oct 2007 06:27:23 +0000 (23:27 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:42:53 +0000 (08:42 -0700)
Now that we don't pre-allocate the new ->sighand, we can kill the first fast
path, it doesn't make sense any longer. At best, it can save one "list_empty()"
check but leads to the code duplication.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/exec.c

index c6e91c3dc2a1e9dd0bbc70edf1eca05594489324..ab5a4a3ece4690c5a45a41ec3745559883ce3451 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -752,15 +752,6 @@ static int de_thread(struct task_struct *tsk)
        struct task_struct *leader = NULL;
        int count;
 
-       /*
-        * If we don't share sighandlers, then we aren't sharing anything
-        * and we can just re-use it all.
-        */
-       if (atomic_read(&oldsighand->count) <= 1) {
-               exit_itimers(sig);
-               return 0;
-       }
-
        if (thread_group_empty(tsk))
                goto no_thread_group;