diff options
author | Ulrich Obergfell <uobergfe@redhat.com> | 2015-04-14 22:44:01 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-14 23:48:58 (GMT) |
commit | f54c2274f5515da6bae779c7340cd0dc69d0dd8d (patch) | |
tree | afc4103494ae86e63d264f87ca523f7cdbce62fa | |
parent | a0c9cbb93da9b9a0e00907a4a5d2e5f1fed86350 (diff) | |
download | linux-f54c2274f5515da6bae779c7340cd0dc69d0dd8d.tar.xz |
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>
-rw-r--r-- | kernel/watchdog.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index dcc4990..28c833b 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -701,6 +701,8 @@ static int proc_watchdog_update(void) } +static DEFINE_MUTEX(watchdog_proc_mutex); + /* * proc handler for /proc/sys/kernel/nmi_watchdog,watchdog_thresh */ @@ -710,7 +712,6 @@ int proc_dowatchdog(struct ctl_table *table, int write, { int err, old_thresh, old_enabled; bool old_hardlockup; - static DEFINE_MUTEX(watchdog_proc_mutex); mutex_lock(&watchdog_proc_mutex); old_thresh = ACCESS_ONCE(watchdog_thresh); |