aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/watchdog.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/watchdog.c')
-rw-r--r--kernel/watchdog.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index c7e0049344bd..f37f974aa81b 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -493,10 +493,12 @@ int proc_dowatchdog_enabled(struct ctl_table *table, int write,
493{ 493{
494 proc_dointvec(table, write, buffer, length, ppos); 494 proc_dointvec(table, write, buffer, length, ppos);
495 495
496 if (watchdog_enabled) 496 if (write) {
497 watchdog_enable_all_cpus(); 497 if (watchdog_enabled)
498 else 498 watchdog_enable_all_cpus();
499 watchdog_disable_all_cpus(); 499 else
500 watchdog_disable_all_cpus();
501 }
500 return 0; 502 return 0;
501} 503}
502 504