From: tip-bot for Marcin Slusarz <marcin.slusarz@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
a.p.zijlstra@chello.nl, marcin.slusarz@gmail.com,
fweisbec@gmail.com, stable@kernel.org, tglx@linutronix.de,
mingo@elte.hu, dzickus@redhat.com
Subject: [tip:perf/urgent] watchdog: Don't change watchdog state on read of sysctl
Date: Mon, 31 Jan 2011 12:52:16 GMT [thread overview]
Message-ID: <tip-9ffdc6c37df131f89d52001e0ef03091b158826f@git.kernel.org> (raw)
In-Reply-To: <1296230433-6261-3-git-send-email-dzickus@redhat.com>
Commit-ID: 9ffdc6c37df131f89d52001e0ef03091b158826f
Gitweb: http://git.kernel.org/tip/9ffdc6c37df131f89d52001e0ef03091b158826f
Author: Marcin Slusarz <marcin.slusarz@gmail.com>
AuthorDate: Fri, 28 Jan 2011 11:00:33 -0500
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 31 Jan 2011 13:22:43 +0100
watchdog: Don't change watchdog state on read of sysctl
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
[ add {}'s to fix a warning ]
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: <stable@kernel.org>
LKML-Reference: <1296230433-6261-3-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/watchdog.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index c7e0049..f37f974 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -493,10 +493,12 @@ int proc_dowatchdog_enabled(struct ctl_table *table, int write,
{
proc_dointvec(table, write, buffer, length, ppos);
- if (watchdog_enabled)
- watchdog_enable_all_cpus();
- else
- watchdog_disable_all_cpus();
+ if (write) {
+ if (watchdog_enabled)
+ watchdog_enable_all_cpus();
+ else
+ watchdog_disable_all_cpus();
+ }
return 0;
}
next prev parent reply other threads:[~2011-01-31 12:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-28 16:00 [PATCH 1/3] watchdog: Fix broken nowatchdog logic Don Zickus
2011-01-28 16:00 ` [PATCH 2/3] watchdog: Fix sysctl consistency Don Zickus
2011-01-31 12:51 ` [tip:perf/urgent] " tip-bot for Marcin Slusarz
2011-01-28 16:00 ` [PATCH 3/3] watchdog: Don't change watchdog state on read of sysctl Don Zickus
2011-01-31 12:52 ` tip-bot for Marcin Slusarz [this message]
2011-01-31 12:51 ` [tip:perf/urgent] watchdog: Fix broken nowatchdog logic tip-bot for Marcin Slusarz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-9ffdc6c37df131f89d52001e0ef03091b158826f@git.kernel.org \
--to=marcin.slusarz@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=dzickus@redhat.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=stable@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox