From: Zhaolei <zhaolei@cn.fujitsu.com>
Date: Tue, 6 Jan 2009 22:40:46 +0000 (-0800)
Subject: fork.c: cleanup for copy_sighand()
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=60348802e9cb137ee86590c3e4c57c1ec2e8fc69;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

fork.c: cleanup for copy_sighand()

Check CLONE_SIGHAND only is enough, because combination of CLONE_THREAD and
CLONE_SIGHAND is already done in copy_process().

Impact: cleanup, no functionality changed

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---

diff --git a/kernel/fork.c b/kernel/fork.c
index 43cbf30669e6..23b912116675 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -758,7 +758,7 @@ static int copy_sighand(unsigned long clone_flags, struct task_struct *tsk)
 {
 	struct sighand_struct *sig;
 
-	if (clone_flags & (CLONE_SIGHAND | CLONE_THREAD)) {
+	if (clone_flags & CLONE_SIGHAND) {
 		atomic_inc(&current->sighand->count);
 		return 0;
 	}