Commit 946d1977 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar

watchdog/core: Rename watchdog_proc_mutex

Following patches will use the mutex for other purposes as well. Rename it
as it is not longer a proc specific thing.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarDon Zickus <dzickus@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Ulrich Obergfell <uobergfe@redhat.com>
Link: http://lkml.kernel.org/r/20170912194146.647714850@linutronix.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent b7a34981
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
#include <linux/kvm_para.h> #include <linux/kvm_para.h>
#include <linux/kthread.h> #include <linux/kthread.h>
/* Watchdog configuration */ static DEFINE_MUTEX(watchdog_mutex);
static DEFINE_MUTEX(watchdog_proc_mutex);
int __read_mostly nmi_watchdog_enabled; int __read_mostly nmi_watchdog_enabled;
...@@ -704,7 +703,7 @@ static int proc_watchdog_common(int which, struct ctl_table *table, int write, ...@@ -704,7 +703,7 @@ static int proc_watchdog_common(int which, struct ctl_table *table, int write,
int *watchdog_param = (int *)table->data; int *watchdog_param = (int *)table->data;
cpu_hotplug_disable(); cpu_hotplug_disable();
mutex_lock(&watchdog_proc_mutex); mutex_lock(&watchdog_mutex);
/* /*
* If the parameter is being read return the state of the corresponding * If the parameter is being read return the state of the corresponding
...@@ -751,7 +750,7 @@ static int proc_watchdog_common(int which, struct ctl_table *table, int write, ...@@ -751,7 +750,7 @@ static int proc_watchdog_common(int which, struct ctl_table *table, int write,
err = proc_watchdog_update(); err = proc_watchdog_update();
} }
out: out:
mutex_unlock(&watchdog_proc_mutex); mutex_unlock(&watchdog_mutex);
cpu_hotplug_enable(); cpu_hotplug_enable();
return err; return err;
} }
...@@ -795,7 +794,7 @@ int proc_watchdog_thresh(struct ctl_table *table, int write, ...@@ -795,7 +794,7 @@ int proc_watchdog_thresh(struct ctl_table *table, int write,
int err, old, new; int err, old, new;
cpu_hotplug_disable(); cpu_hotplug_disable();
mutex_lock(&watchdog_proc_mutex); mutex_lock(&watchdog_mutex);
old = ACCESS_ONCE(watchdog_thresh); old = ACCESS_ONCE(watchdog_thresh);
err = proc_dointvec_minmax(table, write, buffer, lenp, ppos); err = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
...@@ -817,7 +816,7 @@ int proc_watchdog_thresh(struct ctl_table *table, int write, ...@@ -817,7 +816,7 @@ int proc_watchdog_thresh(struct ctl_table *table, int write,
set_sample_period(); set_sample_period();
} }
out: out:
mutex_unlock(&watchdog_proc_mutex); mutex_unlock(&watchdog_mutex);
cpu_hotplug_enable(); cpu_hotplug_enable();
return err; return err;
} }
...@@ -834,7 +833,7 @@ int proc_watchdog_cpumask(struct ctl_table *table, int write, ...@@ -834,7 +833,7 @@ int proc_watchdog_cpumask(struct ctl_table *table, int write,
int err; int err;
cpu_hotplug_disable(); cpu_hotplug_disable();
mutex_lock(&watchdog_proc_mutex); mutex_lock(&watchdog_mutex);
err = proc_do_large_bitmap(table, write, buffer, lenp, ppos); err = proc_do_large_bitmap(table, write, buffer, lenp, ppos);
if (!err && write) { if (!err && write) {
...@@ -855,7 +854,7 @@ int proc_watchdog_cpumask(struct ctl_table *table, int write, ...@@ -855,7 +854,7 @@ int proc_watchdog_cpumask(struct ctl_table *table, int write,
watchdog_nmi_reconfigure(); watchdog_nmi_reconfigure();
} }
mutex_unlock(&watchdog_proc_mutex); mutex_unlock(&watchdog_mutex);
cpu_hotplug_enable(); cpu_hotplug_enable();
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment