Commit 69914796 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/net-2.6

into ppc970.osdl.org:/home/torvalds/v2.5/linux
parents 603ba04d 8f5c8c63
......@@ -787,6 +787,7 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
if (flags & MSG_ERRQUEUE)
return ip_recv_error(sk, msg, len);
try_again:
skb = skb_recv_datagram(sk, flags, noblock, &err);
if (!skb)
goto out;
......@@ -852,7 +853,9 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
skb_free_datagram(sk, skb);
return -EAGAIN;
if (noblock)
return -EAGAIN;
goto try_again;
}
int udp_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
......
......@@ -3355,8 +3355,7 @@ void __init addrconf_init(void)
#endif
}
#ifdef MODULE
void addrconf_cleanup(void)
void __exit addrconf_cleanup(void)
{
struct net_device *dev;
struct inet6_dev *idev;
......@@ -3417,5 +3416,3 @@ void addrconf_cleanup(void)
proc_net_remove("if_inet6");
#endif
}
#endif /* MODULE */
......@@ -90,11 +90,6 @@ extern int if6_proc_init(void);
extern void if6_proc_exit(void);
#endif
#ifdef CONFIG_SYSCTL
extern void ipv6_sysctl_register(void);
extern void ipv6_sysctl_unregister(void);
#endif
int sysctl_ipv6_bindv6only;
#ifdef INET_REFCNT_DEBUG
......@@ -573,7 +568,7 @@ int ipv6_unload(void)
#endif
#endif
#if defined(MODULE) && defined(CONFIG_SYSCTL)
#ifdef CONFIG_SYSCTL
extern void ipv6_sysctl_register(void);
extern void ipv6_sysctl_unregister(void);
#endif
......@@ -784,7 +779,7 @@ static int __init inet6_init(void)
* able to communicate via both network protocols.
*/
#if defined(MODULE) && defined(CONFIG_SYSCTL)
#ifdef CONFIG_SYSCTL
ipv6_sysctl_register();
#endif
err = icmpv6_init(&inet6_family_ops);
......@@ -859,7 +854,7 @@ static int __init inet6_init(void)
ndisc_fail:
icmpv6_cleanup();
icmp_fail:
#if defined(MODULE) && defined(CONFIG_SYSCTL)
#ifdef CONFIG_SYSCTL
ipv6_sysctl_unregister();
#endif
cleanup_ipv6_mibs();
......@@ -868,9 +863,7 @@ static int __init inet6_init(void)
}
module_init(inet6_init);
#ifdef MODULE
static void inet6_exit(void)
static void __exit inet6_exit(void)
{
/* First of all disallow new sockets creation. */
sock_unregister(PF_INET6);
......@@ -903,6 +896,5 @@ static void inet6_exit(void)
kmem_cache_destroy(raw6_sk_cachep);
}
module_exit(inet6_exit);
#endif /* MODULE */
MODULE_ALIAS_NETPROTO(PF_INET6);
......@@ -1241,12 +1241,8 @@ void __init fib6_init(void)
NULL, NULL);
}
#ifdef MODULE
void fib6_gc_cleanup(void)
void __exit fib6_gc_cleanup(void)
{
del_timer(&ip6_fib_timer);
kmem_cache_destroy(fib6_node_kmem);
}
#endif
......@@ -680,24 +680,12 @@ int ipv6_getsockopt(struct sock *sk, int level, int optname, char *optval,
return 0;
}
#if defined(MODULE) && defined(CONFIG_SYSCTL)
/*
* sysctl registration functions defined in sysctl_net_ipv6.c
*/
extern void ipv6_sysctl_register(void);
extern void ipv6_sysctl_unregister(void);
#endif
void __init ipv6_packet_init(void)
{
dev_add_pack(&ipv6_packet_type);
}
#ifdef MODULE
void ipv6_packet_cleanup(void)
void __exit ipv6_packet_cleanup(void)
{
dev_remove_pack(&ipv6_packet_type);
}
#endif
......@@ -2001,8 +2001,7 @@ void __init ip6_route_init(void)
#endif
}
#ifdef MODULE
void ip6_route_cleanup(void)
void __exit ip6_route_cleanup(void)
{
#ifdef CONFIG_PROC_FS
proc_net_remove("ipv6_route");
......@@ -2015,4 +2014,3 @@ void ip6_route_cleanup(void)
fib6_gc_cleanup();
kmem_cache_destroy(ip6_dst_ops.kmem_cachep);
}
#endif /* MODULE */
......@@ -805,13 +805,11 @@ static struct inet_protocol sit_protocol = {
.err_handler = ipip6_err,
};
#ifdef MODULE
void sit_cleanup(void)
void __exit sit_cleanup(void)
{
inet_del_protocol(&sit_protocol, IPPROTO_IPV6);
unregister_netdev(ipip6_fb_tunnel_dev);
}
#endif
int __init sit_init(void)
{
......
......@@ -79,7 +79,6 @@ ctl_table ipv6_table[] = {
{ .ctl_name = 0 }
};
#ifdef MODULE
static struct ctl_table_header *ipv6_sysctl_header;
static ctl_table ipv6_net_table[] = {
......@@ -111,7 +110,6 @@ void ipv6_sysctl_unregister(void)
{
unregister_sysctl_table(ipv6_sysctl_header);
}
#endif /* MODULE */
#endif /* CONFIG_SYSCTL */
......
......@@ -26,10 +26,6 @@ extern struct ctl_table core_table[];
extern struct ctl_table ether_table[];
#endif
#ifdef CONFIG_IPV6
extern struct ctl_table ipv6_table[];
#endif
#ifdef CONFIG_TR
extern struct ctl_table tr_table[];
#endif
......@@ -57,14 +53,6 @@ struct ctl_table net_table[] = {
.child = ipv4_table
},
#endif
#ifdef CONFIG_IPV6
{
.ctl_name = NET_IPV6,
.procname = "ipv6",
.mode = 0555,
.child = ipv6_table,
},
#endif
#ifdef CONFIG_TR
{
.ctl_name = NET_TR,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment