aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-10-16 01:04:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 14:21:47 -0400
commitf221e726bf4e082a05dcd573379ac859bfba7126 (patch)
treea05f674caac693dc9aec7e46dd06115389f7ece3 /ipc
parentf40cbaa5b0a4719489e6e7947351c99a159aca30 (diff)
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>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_sysctl.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
index 69bc85978ba0..0dfebc509426 100644
--- a/ipc/ipc_sysctl.c
+++ b/ipc/ipc_sysctl.c
@@ -131,7 +131,7 @@ static int proc_ipcauto_dointvec_minmax(ctl_table *table, int write,
131 131
132#ifdef CONFIG_SYSCTL_SYSCALL 132#ifdef CONFIG_SYSCTL_SYSCALL
133/* The generic sysctl ipc data routine. */ 133/* The generic sysctl ipc data routine. */
134static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen, 134static int sysctl_ipc_data(ctl_table *table,
135 void __user *oldval, size_t __user *oldlenp, 135 void __user *oldval, size_t __user *oldlenp,
136 void __user *newval, size_t newlen) 136 void __user *newval, size_t newlen)
137{ 137{
@@ -169,14 +169,13 @@ static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen,
169 return 1; 169 return 1;
170} 170}
171 171
172static int sysctl_ipc_registered_data(ctl_table *table, int __user *name, 172static int sysctl_ipc_registered_data(ctl_table *table,
173 int nlen, void __user *oldval, size_t __user *oldlenp, 173 void __user *oldval, size_t __user *oldlenp,
174 void __user *newval, size_t newlen) 174 void __user *newval, size_t newlen)
175{ 175{
176 int rc; 176 int rc;
177 177
178 rc = sysctl_ipc_data(table, name, nlen, oldval, oldlenp, newval, 178 rc = sysctl_ipc_data(table, oldval, oldlenp, newval, newlen);
179 newlen);
180 179
181 if (newval && newlen && rc > 0) 180 if (newval && newlen && rc > 0)
182 /* 181 /*