sysctl: simplify ->strategy
name and nlen parameters passed to ->strategy hook are unused, remove them. In general ->strategy hook should know what it's doing, and don't do something tricky for which, say, pointer to original userspace array may be needed (name). Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> [ networking bits ] Cc: Ralf Baechle <ralf@linux-mips.org> Cc: David Howells <dhowells@redhat.com> Cc: Matt Mackall <mpm@selenic.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
这个提交包含在:
@@ -131,7 +131,7 @@ static int proc_ipcauto_dointvec_minmax(ctl_table *table, int write,
|
||||
|
||||
#ifdef CONFIG_SYSCTL_SYSCALL
|
||||
/* The generic sysctl ipc data routine. */
|
||||
static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
|
||||
static int sysctl_ipc_data(ctl_table *table,
|
||||
void __user *oldval, size_t __user *oldlenp,
|
||||
void __user *newval, size_t newlen)
|
||||
{
|
||||
@@ -169,14 +169,13 @@ static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int sysctl_ipc_registered_data(ctl_table *table, int __user *name,
|
||||
int nlen, void __user *oldval, size_t __user *oldlenp,
|
||||
static int sysctl_ipc_registered_data(ctl_table *table,
|
||||
void __user *oldval, size_t __user *oldlenp,
|
||||
void __user *newval, size_t newlen)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = sysctl_ipc_data(table, name, nlen, oldval, oldlenp, newval,
|
||||
newlen);
|
||||
rc = sysctl_ipc_data(table, oldval, oldlenp, newval, newlen);
|
||||
|
||||
if (newval && newlen && rc > 0)
|
||||
/*
|
||||
|
在新工单中引用
屏蔽一个用户