From: Don Zickus <dzickus@redhat.com>
To: x86@kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Marcin Slusarz <marcin.slusarz@gmail.com>,
Don Zickus <dzickus@redhat.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@elte.hu>,
stable@kernel.org
Subject: [PATCH 3/3] watchdog: Don't change watchdog state on read of sysctl
Date: Fri, 28 Jan 2011 11:00:33 -0500 [thread overview]
Message-ID: <1296230433-6261-3-git-send-email-dzickus@redhat.com> (raw)
In-Reply-To: <1296230433-6261-1-git-send-email-dzickus@redhat.com>
From: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: stable@kernel.org
[ add {}'s to fix a warning ]
Signed-off-by: Don Zickus <dzickus@redhat.com>
---
kernel/watchdog.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 38af39a..6b16cb1 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;
}
--
1.7.3.4
next prev parent reply other threads:[~2011-01-28 16:01 UTC|newest]
Thread overview: 7+ 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 ` Don Zickus [this message]
2011-01-31 12:52 ` [tip:perf/urgent] watchdog: Don't change watchdog state on read of sysctl tip-bot for Marcin Slusarz
2011-01-31 12:51 ` [tip:perf/urgent] watchdog: Fix broken nowatchdog logic tip-bot for Marcin Slusarz
-- strict thread matches above, loose matches on Subject: below --
2011-01-18 22:37 [PATCH 3/3] watchdog: don't change watchdog state on read of sysctl 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=1296230433-6261-3-git-send-email-dzickus@redhat.com \
--to=dzickus@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcin.slusarz@gmail.com \
--cc=mingo@elte.hu \
--cc=stable@kernel.org \
--cc=x86@kernel.org \
/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