[PATCH] softlockup: fix to allow compiling with !DETECT_HUNG_TASK

From: Mandeep Singh Baines
Date: Fri Jan 16 2009 - 12:10:51 EST


Ingo Molnar (mingo@xxxxxxx) wrote:
>
> doesnt build with !SOFTLOCKUP:
>
> kernel/fork.c:1049: error: 'struct task_struct' has no member named 'last_switch_count'
> kernel/fork.c:1050: error: 'struct task_struct' has no member named 'last_switch_timestamp'
>
> Could you send a delta fix patch relative to -v4 please? Thanks,
>
> Ingo

Oops. Will be more careful next time.

---

Fixes the following compile error:

kernel/fork.c:1049: error: 'struct task_struct' has no member named 'last_switch_count'
kernel/fork.c:1050: error: 'struct task_struct' has no member named 'last_switch_timestamp'

Signed-off-by: Mandeep Singh Baines <msb@xxxxxxxxxx>
---
kernel/fork.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index fb1f5e9..d68e59b 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1045,7 +1045,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,

p->default_timer_slack_ns = current->timer_slack_ns;

-#ifdef CONFIG_DETECT_SOFTLOCKUP
+#ifdef CONFIG_DETECT_HUNG_TASK
p->last_switch_count = 0;
p->last_switch_timestamp = 0;
#endif
--
1.5.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/