diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-10-16 01:04:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-16 14:21:47 -0400 |
commit | f221e726bf4e082a05dcd573379ac859bfba7126 (patch) | |
tree | a05f674caac693dc9aec7e46dd06115389f7ece3 /net/ipv6 | |
parent | f40cbaa5b0a4719489e6e7947351c99a159aca30 (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 'net/ipv6')
-rw-r--r-- | net/ipv6/addrconf.c | 1 | ||||
-rw-r--r-- | net/ipv6/ndisc.c | 11 |
2 files changed, 4 insertions, 8 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 7b6a584b62dd..eea9542728ca 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -3982,7 +3982,6 @@ int addrconf_sysctl_forward(ctl_table *ctl, int write, struct file * filp, | |||
3982 | } | 3982 | } |
3983 | 3983 | ||
3984 | static int addrconf_sysctl_forward_strategy(ctl_table *table, | 3984 | static int addrconf_sysctl_forward_strategy(ctl_table *table, |
3985 | int __user *name, int nlen, | ||
3986 | void __user *oldval, | 3985 | void __user *oldval, |
3987 | size_t __user *oldlenp, | 3986 | size_t __user *oldlenp, |
3988 | void __user *newval, size_t newlen) | 3987 | void __user *newval, size_t newlen) |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 840b15780a36..7f39e9b36456 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -1730,9 +1730,8 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * f | |||
1730 | return ret; | 1730 | return ret; |
1731 | } | 1731 | } |
1732 | 1732 | ||
1733 | int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, | 1733 | int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, |
1734 | int nlen, void __user *oldval, | 1734 | void __user *oldval, size_t __user *oldlenp, |
1735 | size_t __user *oldlenp, | ||
1736 | void __user *newval, size_t newlen) | 1735 | void __user *newval, size_t newlen) |
1737 | { | 1736 | { |
1738 | struct net_device *dev = ctl->extra1; | 1737 | struct net_device *dev = ctl->extra1; |
@@ -1745,13 +1744,11 @@ int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, | |||
1745 | 1744 | ||
1746 | switch (ctl->ctl_name) { | 1745 | switch (ctl->ctl_name) { |
1747 | case NET_NEIGH_REACHABLE_TIME: | 1746 | case NET_NEIGH_REACHABLE_TIME: |
1748 | ret = sysctl_jiffies(ctl, name, nlen, | 1747 | ret = sysctl_jiffies(ctl, oldval, oldlenp, newval, newlen); |
1749 | oldval, oldlenp, newval, newlen); | ||
1750 | break; | 1748 | break; |
1751 | case NET_NEIGH_RETRANS_TIME_MS: | 1749 | case NET_NEIGH_RETRANS_TIME_MS: |
1752 | case NET_NEIGH_REACHABLE_TIME_MS: | 1750 | case NET_NEIGH_REACHABLE_TIME_MS: |
1753 | ret = sysctl_ms_jiffies(ctl, name, nlen, | 1751 | ret = sysctl_ms_jiffies(ctl, oldval, oldlenp, newval, newlen); |
1754 | oldval, oldlenp, newval, newlen); | ||
1755 | break; | 1752 | break; |
1756 | default: | 1753 | default: |
1757 | ret = 0; | 1754 | ret = 0; |