diff options
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index fb9444282836..bf582f75014b 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -639,6 +639,9 @@ static int copy_mm(unsigned long clone_flags, struct task_struct * tsk) | |||
639 | 639 | ||
640 | tsk->min_flt = tsk->maj_flt = 0; | 640 | tsk->min_flt = tsk->maj_flt = 0; |
641 | tsk->nvcsw = tsk->nivcsw = 0; | 641 | tsk->nvcsw = tsk->nivcsw = 0; |
642 | #ifdef CONFIG_DETECT_HUNG_TASK | ||
643 | tsk->last_switch_count = tsk->nvcsw + tsk->nivcsw; | ||
644 | #endif | ||
642 | 645 | ||
643 | tsk->mm = NULL; | 646 | tsk->mm = NULL; |
644 | tsk->active_mm = NULL; | 647 | tsk->active_mm = NULL; |
@@ -1041,11 +1044,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1041 | 1044 | ||
1042 | p->default_timer_slack_ns = current->timer_slack_ns; | 1045 | p->default_timer_slack_ns = current->timer_slack_ns; |
1043 | 1046 | ||
1044 | #ifdef CONFIG_DETECT_HUNG_TASK | ||
1045 | p->last_switch_count = 0; | ||
1046 | p->last_switch_timestamp = 0; | ||
1047 | #endif | ||
1048 | |||
1049 | task_io_accounting_init(&p->ioac); | 1047 | task_io_accounting_init(&p->ioac); |
1050 | acct_clear_integrals(p); | 1048 | acct_clear_integrals(p); |
1051 | 1049 | ||