2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-15 00:34:10 +08:00

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>
This commit is contained in:
Marcin Slusarz 2011-01-28 11:00:33 -05:00 committed by Ingo Molnar
parent 397357666d
commit 9ffdc6c37d

View File

@ -493,10 +493,12 @@ int proc_dowatchdog_enabled(struct ctl_table *table, int write,
{ {
proc_dointvec(table, write, buffer, length, ppos); proc_dointvec(table, write, buffer, length, ppos);
if (write) {
if (watchdog_enabled) if (watchdog_enabled)
watchdog_enable_all_cpus(); watchdog_enable_all_cpus();
else else
watchdog_disable_all_cpus(); watchdog_disable_all_cpus();
}
return 0; return 0;
} }