X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=kernel%2Ffork.c;h=989c7c202b3d831ef1aa9ad024872edd864c08ca;hb=5e34437840d33554f69380584311743b39e8fbeb;hp=660c2b8765bce0e112c26460fe037714b6ea3ac5;hpb=3e850509e19b4b013bf6aee7c0d24d047c4b968f;p=linux-2.6-omap-h63xx.git diff --git a/kernel/fork.c b/kernel/fork.c index 660c2b8765b..989c7c202b3 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -645,6 +645,9 @@ static int copy_mm(unsigned long clone_flags, struct task_struct * tsk) tsk->min_flt = tsk->maj_flt = 0; tsk->nvcsw = tsk->nivcsw = 0; +#ifdef CONFIG_DETECT_HUNG_TASK + tsk->last_switch_count = tsk->nvcsw + tsk->nivcsw; +#endif tsk->mm = NULL; tsk->active_mm = NULL; @@ -1032,11 +1035,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, p->default_timer_slack_ns = current->timer_slack_ns; -#ifdef CONFIG_DETECT_SOFTLOCKUP - p->last_switch_count = 0; - p->last_switch_timestamp = 0; -#endif - task_io_accounting_init(&p->ioac); acct_clear_integrals(p);