summaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@sw.ru>2007-10-17 08:27:30 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 17:42:55 +0200
commit42b2dd0a02c512cf59c96f5c227bf54bfe5bbf08 (patch)
treef9e4a572804897772d97e2db1ab0d2adcd28840c /kernel/exit.c
parentadd-vmcore: add a prefix "VMCOREINFO_" to the vmcoreinfo macros (diff)
downloadlinux-42b2dd0a02c512cf59c96f5c227bf54bfe5bbf08.tar.xz
linux-42b2dd0a02c512cf59c96f5c227bf54bfe5bbf08.zip
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/exit.c')
-rw-r--r--kernel/exit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 4c108df88a37..2c704c86edb3 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -947,12 +947,14 @@ fastcall NORET_TYPE void do_exit(long code)
exit_itimers(tsk->signal);
}
acct_collect(code, group_dead);
+#ifdef CONFIG_FUTEX
if (unlikely(tsk->robust_list))
exit_robust_list(tsk);
-#if defined(CONFIG_FUTEX) && defined(CONFIG_COMPAT)
+#ifdef CONFIG_COMPAT
if (unlikely(tsk->compat_robust_list))
compat_exit_robust_list(tsk);
#endif
+#endif
if (group_dead)
tty_audit_exit();
if (unlikely(tsk->audit_context))
@@ -987,6 +989,7 @@ fastcall NORET_TYPE void do_exit(long code)
mpol_free(tsk->mempolicy);
tsk->mempolicy = NULL;
#endif
+#ifdef CONFIG_FUTEX
/*
* This must happen late, after the PID is not
* hashed anymore:
@@ -995,6 +998,7 @@ fastcall NORET_TYPE void do_exit(long code)
exit_pi_state_list(tsk);
if (unlikely(current->pi_state_cache))
kfree(current->pi_state_cache);
+#endif
/*
* Make sure we are holding no locks:
*/