From a49de7b993d7dce26f1c57da521b979f168d1f6b Mon Sep 17 00:00:00 2001 From: Marcin Slusarz Date: Fri, 28 Jan 2011 11:00:32 -0500 Subject: [PATCH] --- yaml --- r: 232764 b: refs/heads/master c: 397357666de6b5b6adb5fa99f9758ec8cf30ac34 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/watchdog.c | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 2d525b6ff347..fa114ccb36a1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4135038a582c20ffdadfcf6564852e0b72a20968 +refs/heads/master: 397357666de6b5b6adb5fa99f9758ec8cf30ac34 diff --git a/trunk/kernel/watchdog.c b/trunk/kernel/watchdog.c index d9961ea1c3f4..c7e0049344bd 100644 --- a/trunk/kernel/watchdog.c +++ b/trunk/kernel/watchdog.c @@ -429,9 +429,6 @@ static int watchdog_enable(int cpu) wake_up_process(p); } - /* if any cpu succeeds, watchdog is considered enabled for the system */ - watchdog_enabled = 1; - return 0; } @@ -459,12 +456,16 @@ static void watchdog_disable(int cpu) static void watchdog_enable_all_cpus(void) { int cpu; - int result = 0; + + watchdog_enabled = 0; for_each_online_cpu(cpu) - result += watchdog_enable(cpu); + if (!watchdog_enable(cpu)) + /* if any cpu succeeds, watchdog is considered + enabled for the system */ + watchdog_enabled = 1; - if (result) + if (!watchdog_enabled) printk(KERN_ERR "watchdog: failed to be enabled on some cpus\n"); }