net: change proto destroy method to return void

Change struct proto destroy function pointer to return void.  Noticed
by Al Viro.

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Brian Haley
2008-06-14 17:04:49 -07:00
committed by David S. Miller
parent 4ae127d1b6
commit 7d06b2e053
16 changed files with 19 additions and 30 deletions

View File

@@ -371,7 +371,7 @@ int inet6_release(struct socket *sock)
EXPORT_SYMBOL(inet6_release);
int inet6_destroy_sock(struct sock *sk)
void inet6_destroy_sock(struct sock *sk)
{
struct ipv6_pinfo *np = inet6_sk(sk);
struct sk_buff *skb;
@@ -389,8 +389,6 @@ int inet6_destroy_sock(struct sock *sk)
if ((opt = xchg(&np->opt, NULL)) != NULL)
sock_kfree_s(sk, opt, opt->tot_len);
return 0;
}
EXPORT_SYMBOL_GPL(inet6_destroy_sock);

View File

@@ -1162,13 +1162,13 @@ static void rawv6_close(struct sock *sk, long timeout)
sk_common_release(sk);
}
static int raw6_destroy(struct sock *sk)
static void raw6_destroy(struct sock *sk)
{
lock_sock(sk);
ip6_flush_pending_frames(sk);
release_sock(sk);
return inet6_destroy_sock(sk);
inet6_destroy_sock(sk);
}
static int rawv6_init_sk(struct sock *sk)

View File

@@ -1872,7 +1872,7 @@ static int tcp_v6_init_sock(struct sock *sk)
return 0;
}
static int tcp_v6_destroy_sock(struct sock *sk)
static void tcp_v6_destroy_sock(struct sock *sk)
{
#ifdef CONFIG_TCP_MD5SIG
/* Clean up the MD5 key list */
@@ -1880,7 +1880,7 @@ static int tcp_v6_destroy_sock(struct sock *sk)
tcp_v6_clear_md5_list(sk);
#endif
tcp_v4_destroy_sock(sk);
return inet6_destroy_sock(sk);
inet6_destroy_sock(sk);
}
#ifdef CONFIG_PROC_FS

View File

@@ -879,15 +879,13 @@ do_confirm:
goto out;
}
int udpv6_destroy_sock(struct sock *sk)
void udpv6_destroy_sock(struct sock *sk)
{
lock_sock(sk);
udp_v6_flush_pending_frames(sk);
release_sock(sk);
inet6_destroy_sock(sk);
return 0;
}
/*

View File

@@ -29,7 +29,7 @@ extern int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,
struct msghdr *msg, size_t len,
int noblock, int flags, int *addr_len);
extern int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb);
extern int udpv6_destroy_sock(struct sock *sk);
extern void udpv6_destroy_sock(struct sock *sk);
#ifdef CONFIG_PROC_FS
extern int udp6_seq_show(struct seq_file *seq, void *v);