diff options
author | Mike Galbraith <efault@gmx.de> | 2011-01-05 05:16:04 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-01-07 09:54:39 -0500 |
commit | 1c5354de90c900b369e2ebd36c3a065ede29eb93 (patch) | |
tree | 3144205e179f8c4503db06e8da95b604d1640b68 /kernel/fork.c | |
parent | e9aa1dd19fe49b5aed3ca94aab87576e534d2a39 (diff) |
sched: Move sched_autogroup_exit() to free_signal_struct()
Per Oleg's suggestion, undo fork failure free/put_signal_struct change,
and move sched_autogroup_exit() to free_signal_struct() instead.
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1294222564.8369.6.camel@marge.simson.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 7d164e25b0f0..dc1a8bbcea7b 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -169,15 +169,14 @@ EXPORT_SYMBOL(free_task); | |||
169 | static inline void free_signal_struct(struct signal_struct *sig) | 169 | static inline void free_signal_struct(struct signal_struct *sig) |
170 | { | 170 | { |
171 | taskstats_tgid_free(sig); | 171 | taskstats_tgid_free(sig); |
172 | sched_autogroup_exit(sig); | ||
172 | kmem_cache_free(signal_cachep, sig); | 173 | kmem_cache_free(signal_cachep, sig); |
173 | } | 174 | } |
174 | 175 | ||
175 | static inline void put_signal_struct(struct signal_struct *sig) | 176 | static inline void put_signal_struct(struct signal_struct *sig) |
176 | { | 177 | { |
177 | if (atomic_dec_and_test(&sig->sigcnt)) { | 178 | if (atomic_dec_and_test(&sig->sigcnt)) |
178 | sched_autogroup_exit(sig); | ||
179 | free_signal_struct(sig); | 179 | free_signal_struct(sig); |
180 | } | ||
181 | } | 180 | } |
182 | 181 | ||
183 | void __put_task_struct(struct task_struct *tsk) | 182 | void __put_task_struct(struct task_struct *tsk) |
@@ -1318,7 +1317,7 @@ bad_fork_cleanup_mm: | |||
1318 | } | 1317 | } |
1319 | bad_fork_cleanup_signal: | 1318 | bad_fork_cleanup_signal: |
1320 | if (!(clone_flags & CLONE_THREAD)) | 1319 | if (!(clone_flags & CLONE_THREAD)) |
1321 | put_signal_struct(p->signal); | 1320 | free_signal_struct(p->signal); |
1322 | bad_fork_cleanup_sighand: | 1321 | bad_fork_cleanup_sighand: |
1323 | __cleanup_sighand(p->sighand); | 1322 | __cleanup_sighand(p->sighand); |
1324 | bad_fork_cleanup_fs: | 1323 | bad_fork_cleanup_fs: |