From: Marcin Slusarz Date: Fri, 28 Jan 2011 16:00:33 +0000 (-0500) Subject: watchdog: Don't change watchdog state on read of sysctl X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9ffdc6c37df131f89d52001e0ef03091b158826f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git watchdog: Don't change watchdog state on read of sysctl Signed-off-by: Marcin Slusarz [ add {}'s to fix a warning ] Signed-off-by: Don Zickus Cc: Peter Zijlstra Cc: Frederic Weisbecker Cc: LKML-Reference: <1296230433-6261-3-git-send-email-dzickus@redhat.com> Signed-off-by: Ingo Molnar --- 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, { 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; }