Skip to contentSkip to conversation

exec: consolidate 2 fast-paths

PATCH In review Oleg Nesterov 1 participant 1 message Aug 18, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/5 exec: consolidate 2 fast-paths

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.

fs/exec.c renamed from fs/exec.c~4_FASTPATH +0 -10
@@ -779,16 +779,6 @@ static int de_thread(struct task_struct 
 	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) {
-		signalfd_detach(tsk);
-		exit_itimers(sig);
-		return 0;
-	}
-
 	if (thread_group_empty(tsk))
 		goto no_thread_group;