diff options
author | Alexey Dobriyan <adobriyan@sw.ru> | 2007-10-17 02:27:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:42:55 -0400 |
commit | 42b2dd0a02c512cf59c96f5c227bf54bfe5bbf08 (patch) | |
tree | f9e4a572804897772d97e2db1ab0d2adcd28840c /kernel/exit.c | |
parent | bcbba6c10ef6b14b0542d7ed7380e95168175818 (diff) |
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.c | 6 |
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) | |||
947 | exit_itimers(tsk->signal); | 947 | exit_itimers(tsk->signal); |
948 | } | 948 | } |
949 | acct_collect(code, group_dead); | 949 | acct_collect(code, group_dead); |
950 | #ifdef CONFIG_FUTEX | ||
950 | if (unlikely(tsk->robust_list)) | 951 | if (unlikely(tsk->robust_list)) |
951 | exit_robust_list(tsk); | 952 | exit_robust_list(tsk); |
952 | #if defined(CONFIG_FUTEX) && defined(CONFIG_COMPAT) | 953 | #ifdef CONFIG_COMPAT |
953 | if (unlikely(tsk->compat_robust_list)) | 954 | if (unlikely(tsk->compat_robust_list)) |
954 | compat_exit_robust_list(tsk); | 955 | compat_exit_robust_list(tsk); |
955 | #endif | 956 | #endif |
957 | #endif | ||
956 | if (group_dead) | 958 | if (group_dead) |
957 | tty_audit_exit(); | 959 | tty_audit_exit(); |
958 | if (unlikely(tsk->audit_context)) | 960 | if (unlikely(tsk->audit_context)) |
@@ -987,6 +989,7 @@ fastcall NORET_TYPE void do_exit(long code) | |||
987 | mpol_free(tsk->mempolicy); | 989 | mpol_free(tsk->mempolicy); |
988 | tsk->mempolicy = NULL; | 990 | tsk->mempolicy = NULL; |
989 | #endif | 991 | #endif |
992 | #ifdef CONFIG_FUTEX | ||
990 | /* | 993 | /* |
991 | * This must happen late, after the PID is not | 994 | * This must happen late, after the PID is not |
992 | * hashed anymore: | 995 | * hashed anymore: |
@@ -995,6 +998,7 @@ fastcall NORET_TYPE void do_exit(long code) | |||
995 | exit_pi_state_list(tsk); | 998 | exit_pi_state_list(tsk); |
996 | if (unlikely(current->pi_state_cache)) | 999 | if (unlikely(current->pi_state_cache)) |
997 | kfree(current->pi_state_cache); | 1000 | kfree(current->pi_state_cache); |
1001 | #endif | ||
998 | /* | 1002 | /* |
999 | * Make sure we are holding no locks: | 1003 | * Make sure we are holding no locks: |
1000 | */ | 1004 | */ |