mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 22:00:53 +07:00
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>
This commit is contained in:
parent
a0c9cbb93d
commit
f54c2274f5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user