aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/watchdog.c
diff options
context:
space:
mode:
authorUlrich Obergfell <uobergfe@redhat.com>2015-04-14 18:44:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 19:48:58 -0400
commitf54c2274f5515da6bae779c7340cd0dc69d0dd8d (patch)
treeafc4103494ae86e63d264f87ca523f7cdbce62fa /kernel/watchdog.c
parenta0c9cbb93da9b9a0e00907a4a5d2e5f1fed86350 (diff)
watchdog: move definition of 'watchdog_proc_mutex' outside of proc_dowatchdog()
This series removes proc_dowatchdog(). Since multiple new functions need the 'watchdog_proc_mutex' to serialize access to the watchdog parameters in /proc/sys/kernel, move the mutex outside of any function. Signed-off-by: Ulrich Obergfell <uobergfe@redhat.com> Signed-off-by: Don Zickus <dzickus@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/watchdog.c')
-rw-r--r--kernel/watchdog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index dcc4990097a2..28c833b42124 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -701,6 +701,8 @@ static int proc_watchdog_update(void)
701 701
702} 702}
703 703
704static DEFINE_MUTEX(watchdog_proc_mutex);
705
704/* 706/*
705 * proc handler for /proc/sys/kernel/nmi_watchdog,watchdog_thresh 707 * proc handler for /proc/sys/kernel/nmi_watchdog,watchdog_thresh
706 */ 708 */
@@ -710,7 +712,6 @@ int proc_dowatchdog(struct ctl_table *table, int write,
710{ 712{
711 int err, old_thresh, old_enabled; 713 int err, old_thresh, old_enabled;
712 bool old_hardlockup; 714 bool old_hardlockup;
713 static DEFINE_MUTEX(watchdog_proc_mutex);
714 715
715 mutex_lock(&watchdog_proc_mutex); 716 mutex_lock(&watchdog_proc_mutex);
716 old_thresh = ACCESS_ONCE(watchdog_thresh); 717 old_thresh = ACCESS_ONCE(watchdog_thresh);