sysctl: remove "struct file *" argument of ->proc_handler
It's unused. It isn't needed -- read or write flag is already passed and sysctl shouldn't care about the rest. It _was_ used in two places at arch/frv for some reason. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: David Howells <dhowells@redhat.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: James Morris <jmorris@namei.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
c0d0787b6d
commit
8d65af789f
@@ -508,14 +508,14 @@ static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu)
|
||||
/*
|
||||
* proc handler for /proc/sys/kernel/nmi
|
||||
*/
|
||||
int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file,
|
||||
int proc_nmi_enabled(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *length, loff_t *ppos)
|
||||
{
|
||||
int old_state;
|
||||
|
||||
nmi_watchdog_enabled = (atomic_read(&nmi_active) > 0) ? 1 : 0;
|
||||
old_state = nmi_watchdog_enabled;
|
||||
proc_dointvec(table, write, file, buffer, length, ppos);
|
||||
proc_dointvec(table, write, buffer, length, ppos);
|
||||
if (!!old_state == !!nmi_watchdog_enabled)
|
||||
return 0;
|
||||
|
||||
|
@@ -228,19 +228,11 @@ static long __vsyscall(3) venosys_1(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
|
||||
static int
|
||||
vsyscall_sysctl_change(ctl_table *ctl, int write, struct file * filp,
|
||||
void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
{
|
||||
return proc_dointvec(ctl, write, filp, buffer, lenp, ppos);
|
||||
}
|
||||
|
||||
static ctl_table kernel_table2[] = {
|
||||
{ .procname = "vsyscall64",
|
||||
.data = &vsyscall_gtod_data.sysctl_enabled, .maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = vsyscall_sysctl_change },
|
||||
.proc_handler = proc_dointvec },
|
||||
{}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user