]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
watchdog: move definition of 'watchdog_proc_mutex' outside of proc_dowatchdog()
authorUlrich Obergfell <uobergfe@redhat.com>
Tue, 14 Apr 2015 22:44:01 +0000 (15:44 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Apr 2015 23:48:58 +0000 (16:48 -0700)
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>
kernel/watchdog.c

index dcc4990097a21a2cc100de376149b77c4d180e42..28c833b421245f4a7a5f591dfa76aa96834836a9 100644 (file)
@@ -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);