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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Brian Haley 2008-06-14 17:04:49 -07:00 • committed by David S. Miller
commit 7d06b2e053
16 changed files with 19 additions and 30 deletions

View file

@ -606,12 +606,11 @@ static void raw_close(struct sock *sk, long timeout)
sk_common_release(sk);
}
static int raw_destroy(struct sock *sk)
static void raw_destroy(struct sock *sk)
{
lock_sock(sk);
ip_flush_pending_frames(sk);
release_sock(sk);
return 0;
}
/* This gets rid of all the nasties in af_inet. -DaveM */

View file

@ -1775,7 +1775,7 @@ static int tcp_v4_init_sock(struct sock *sk)
return 0;
}
int tcp_v4_destroy_sock(struct sock *sk)
void tcp_v4_destroy_sock(struct sock *sk)
{
struct tcp_sock *tp = tcp_sk(sk);
@ -1819,8 +1819,6 @@ int tcp_v4_destroy_sock(struct sock *sk)
}
atomic_dec(&tcp_sockets_allocated);
return 0;
}
EXPORT_SYMBOL(tcp_v4_destroy_sock);

View file

@ -1253,12 +1253,11 @@ int udp_rcv(struct sk_buff *skb)
return __udp4_lib_rcv(skb, udp_hash, IPPROTO_UDP);
}
int udp_destroy_sock(struct sock *sk)
void udp_destroy_sock(struct sock *sk)
{
lock_sock(sk);
udp_flush_pending_frames(sk);
release_sock(sk);
return 0;
}
/*

View file

@ -26,7 +26,7 @@ extern int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
extern int udp_sendpage(struct sock *sk, struct page *page, int offset,
size_t size, int flags);
extern int udp_queue_rcv_skb(struct sock * sk, struct sk_buff *skb);
extern int udp_destroy_sock(struct sock *sk);
extern void udp_destroy_sock(struct sock *sk);
#ifdef CONFIG_PROC_FS
extern int udp4_seq_show(struct seq_file *seq, void *v);