提交 725a8ff0 编写于 作者: D Denis V. Lunev 提交者: David S. Miller

ipv6: remove unused parameter from ip6_ra_control

Signed-off-by: NDenis V. Lunev <den@openvz.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 bdccc4ca
...@@ -227,9 +227,7 @@ static inline void fl6_sock_release(struct ip6_flowlabel *fl) ...@@ -227,9 +227,7 @@ static inline void fl6_sock_release(struct ip6_flowlabel *fl)
atomic_dec(&fl->users); atomic_dec(&fl->users);
} }
extern int ip6_ra_control(struct sock *sk, int sel, extern int ip6_ra_control(struct sock *sk, int sel);
void (*destructor)(struct sock *));
extern int ipv6_parse_hopopts(struct sk_buff *skb); extern int ipv6_parse_hopopts(struct sk_buff *skb);
......
...@@ -59,7 +59,7 @@ DEFINE_SNMP_STAT(struct ipstats_mib, ipv6_statistics) __read_mostly; ...@@ -59,7 +59,7 @@ DEFINE_SNMP_STAT(struct ipstats_mib, ipv6_statistics) __read_mostly;
struct ip6_ra_chain *ip6_ra_chain; struct ip6_ra_chain *ip6_ra_chain;
DEFINE_RWLOCK(ip6_ra_lock); DEFINE_RWLOCK(ip6_ra_lock);
int ip6_ra_control(struct sock *sk, int sel, void (*destructor)(struct sock *)) int ip6_ra_control(struct sock *sk, int sel)
{ {
struct ip6_ra_chain *ra, *new_ra, **rap; struct ip6_ra_chain *ra, *new_ra, **rap;
...@@ -81,8 +81,6 @@ int ip6_ra_control(struct sock *sk, int sel, void (*destructor)(struct sock *)) ...@@ -81,8 +81,6 @@ int ip6_ra_control(struct sock *sk, int sel, void (*destructor)(struct sock *))
*rap = ra->next; *rap = ra->next;
write_unlock_bh(&ip6_ra_lock); write_unlock_bh(&ip6_ra_lock);
if (ra->destructor)
ra->destructor(sk);
sock_put(sk); sock_put(sk);
kfree(ra); kfree(ra);
return 0; return 0;
...@@ -94,7 +92,6 @@ int ip6_ra_control(struct sock *sk, int sel, void (*destructor)(struct sock *)) ...@@ -94,7 +92,6 @@ int ip6_ra_control(struct sock *sk, int sel, void (*destructor)(struct sock *))
} }
new_ra->sk = sk; new_ra->sk = sk;
new_ra->sel = sel; new_ra->sel = sel;
new_ra->destructor = destructor;
new_ra->next = ra; new_ra->next = ra;
*rap = new_ra; *rap = new_ra;
sock_hold(sk); sock_hold(sk);
...@@ -632,7 +629,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, ...@@ -632,7 +629,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
case IPV6_ROUTER_ALERT: case IPV6_ROUTER_ALERT:
if (optlen < sizeof(int)) if (optlen < sizeof(int))
goto e_inval; goto e_inval;
retv = ip6_ra_control(sk, val, NULL); retv = ip6_ra_control(sk, val);
break; break;
case IPV6_MTU_DISCOVER: case IPV6_MTU_DISCOVER:
if (optlen < sizeof(int)) if (optlen < sizeof(int))
......
...@@ -1157,7 +1157,7 @@ static int rawv6_ioctl(struct sock *sk, int cmd, unsigned long arg) ...@@ -1157,7 +1157,7 @@ static int rawv6_ioctl(struct sock *sk, int cmd, unsigned long arg)
static void rawv6_close(struct sock *sk, long timeout) static void rawv6_close(struct sock *sk, long timeout)
{ {
if (inet_sk(sk)->num == IPPROTO_RAW) if (inet_sk(sk)->num == IPPROTO_RAW)
ip6_ra_control(sk, -1, NULL); ip6_ra_control(sk, -1);
ip6mr_sk_done(sk); ip6mr_sk_done(sk);
sk_common_release(sk); sk_common_release(sk);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册