diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-26 09:47:43 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-26 09:47:43 -0800 |
commit | 1e70c7f7a9d4a3d2cc78b40e1d7768d99cd79899 (patch) | |
tree | 1218c32008412e57314f8f9db8d3b4912e2ecb25 /kernel/fork.c | |
parent | 810ee58de26c9c1255d716b1db7344c4a1093fec (diff) | |
parent | 1d4a7f1c4faf53eb9e822743ec8a70b3019a26d2 (diff) | |
download | linux-next-1e70c7f7a9d4a3d2cc78b40e1d7768d99cd79899.tar.gz |
Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
hrtimers: fix inconsistent lock state on resume in hres_timers_resume
time-sched.c: tick_nohz_update_jiffies should be static
locking, hpet: annotate false positive warning
kernel/fork.c: unused variable 'ret'
itimers: remove the per-cpu-ish-ness
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index bf0cef8bbdf2..242a706e7721 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -817,17 +817,17 @@ static void posix_cpu_timers_init_group(struct signal_struct *sig) static int copy_signal(unsigned long clone_flags, struct task_struct *tsk) { struct signal_struct *sig; - int ret; if (clone_flags & CLONE_THREAD) { - ret = thread_group_cputime_clone_thread(current); - if (likely(!ret)) { - atomic_inc(¤t->signal->count); - atomic_inc(¤t->signal->live); - } - return ret; + atomic_inc(¤t->signal->count); + atomic_inc(¤t->signal->live); + return 0; } sig = kmem_cache_alloc(signal_cachep, GFP_KERNEL); + + if (sig) + posix_cpu_timers_init_group(sig); + tsk->signal = sig; if (!sig) return -ENOMEM; @@ -864,8 +864,6 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk) memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim); task_unlock(current->group_leader); - posix_cpu_timers_init_group(sig); - acct_init_pacct(&sig->pacct); tty_audit_fork(sig); |