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 660c2b8765bc..989c7c202b3d 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) | |||
645 | 645 | ||
646 | tsk->min_flt = tsk->maj_flt = 0; | 646 | tsk->min_flt = tsk->maj_flt = 0; |
647 | tsk->nvcsw = tsk->nivcsw = 0; | 647 | tsk->nvcsw = tsk->nivcsw = 0; |
648 | #ifdef CONFIG_DETECT_HUNG_TASK | ||
649 | tsk->last_switch_count = tsk->nvcsw + tsk->nivcsw; | ||
650 | #endif | ||
648 | 651 | ||
649 | tsk->mm = NULL; | 652 | tsk->mm = NULL; |
650 | tsk->active_mm = NULL; | 653 | tsk->active_mm = NULL; |
@@ -1032,11 +1035,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1032 | 1035 | ||
1033 | p->default_timer_slack_ns = current->timer_slack_ns; | 1036 | p->default_timer_slack_ns = current->timer_slack_ns; |
1034 | 1037 | ||
1035 | #ifdef CONFIG_DETECT_SOFTLOCKUP | ||
1036 | p->last_switch_count = 0; | ||
1037 | p->last_switch_timestamp = 0; | ||
1038 | #endif | ||
1039 | |||
1040 | task_io_accounting_init(&p->ioac); | 1038 | task_io_accounting_init(&p->ioac); |
1041 | acct_clear_integrals(p); | 1039 | acct_clear_integrals(p); |
1042 | 1040 | ||