summaryrefslogtreecommitdiff
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@sw.ru>2007-10-17 10:27:30 +0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 19:42:55 +0400
commit42b2dd0a02c512cf59c96f5c227bf54bfe5bbf08 (patch)
treef9e4a572804897772d97e2db1ab0d2adcd28840c /kernel/fork.c
parentbcbba6c10ef6b14b0542d7ed7380e95168175818 (diff)
downloadlinux-42b2dd0a02c512cf59c96f5c227bf54bfe5bbf08.tar.xz
Shrink task_struct if CONFIG_FUTEX=n
robust_list, compat_robust_list, pi_state_list, pi_state_cache are really used if futexes are on. Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 8a97e92c604f..3e764f6f2be1 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1156,13 +1156,14 @@ static struct task_struct *copy_process(unsigned long clone_flags,
* Clear TID on mm_release()?
*/
p->clear_child_tid = (clone_flags & CLONE_CHILD_CLEARTID) ? child_tidptr: NULL;
+#ifdef CONFIG_FUTEX
p->robust_list = NULL;
#ifdef CONFIG_COMPAT
p->compat_robust_list = NULL;
#endif
INIT_LIST_HEAD(&p->pi_state_list);
p->pi_state_cache = NULL;
-
+#endif
/*
* sigaltstack should be cleared when sharing the same VM
*/