summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2005-12-22 12:43:42 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-01-03 13:11:14 -0800
commit77d76ea310b50a9c8ff15bd290fcb4ed4961adf2 (patch)
tree7d6e8b2426d4b3debe5ddf838ab2a2ef13f1b106
parent7708610b1bff4a0ba8a73733d3c7c4bda9f94b21 (diff)
downloadlinux-3.10-77d76ea310b50a9c8ff15bd290fcb4ed4961adf2.tar.gz
linux-3.10-77d76ea310b50a9c8ff15bd290fcb4ed4961adf2.tar.bz2
linux-3.10-77d76ea310b50a9c8ff15bd290fcb4ed4961adf2.zip
[NET]: Small cleanup to socket initialization
sock_init can be done as a core_initcall instead of calling it directly in init/main.c Also I removed an out of date #ifdef. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/skbuff.h1
-rw-r--r--include/linux/socket.h1
-rw-r--r--init/main.c4
-rw-r--r--net/socket.c10
4 files changed, 5 insertions, 11 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 97f6580ce03..971677178e0 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -32,7 +32,6 @@
#define HAVE_ALLOC_SKB /* For the drivers to know */
#define HAVE_ALIGNABLE_SKB /* Ditto 8) */
-#define SLAB_SKB /* Slabified skbuffs */
#define CHECKSUM_NONE 0
#define CHECKSUM_HW 1
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 1739c2d5b95..9f4019156fd 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -27,7 +27,6 @@ struct __kernel_sockaddr_storage {
#include <linux/compiler.h> /* __user */
extern int sysctl_somaxconn;
-extern void sock_init(void);
#ifdef CONFIG_PROC_FS
struct seq_file;
extern void socket_seq_show(struct seq_file *seq);
diff --git a/init/main.c b/init/main.c
index 27f97f9b463..54aaf561cf6 100644
--- a/init/main.c
+++ b/init/main.c
@@ -47,7 +47,6 @@
#include <linux/rmap.h>
#include <linux/mempolicy.h>
#include <linux/key.h>
-#include <net/sock.h>
#include <asm/io.h>
#include <asm/bugs.h>
@@ -614,9 +613,6 @@ static void __init do_basic_setup(void)
sysctl_init();
#endif
- /* Networking initialization needs a process context */
- sock_init();
-
do_initcalls();
}
diff --git a/net/socket.c b/net/socket.c
index 3145103cdf5..98be7ef3c08 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2036,7 +2036,7 @@ int sock_unregister(int family)
return 0;
}
-void __init sock_init(void)
+static int __init sock_init(void)
{
/*
* Initialize sock SLAB cache.
@@ -2044,12 +2044,10 @@ void __init sock_init(void)
sk_init();
-#ifdef SLAB_SKB
/*
* Initialize skbuff SLAB cache
*/
skb_init();
-#endif
/*
* Initialize the protocols module.
@@ -2058,8 +2056,8 @@ void __init sock_init(void)
init_inodecache();
register_filesystem(&sock_fs_type);
sock_mnt = kern_mount(&sock_fs_type);
- /* The real protocol initialization is performed when
- * do_initcalls is run.
+
+ /* The real protocol initialization is performed in later initcalls.
*/
#ifdef CONFIG_NETFILTER
@@ -2067,6 +2065,8 @@ void __init sock_init(void)
#endif
}
+core_initcall(sock_init); /* early initcall */
+
#ifdef CONFIG_PROC_FS
void socket_seq_show(struct seq_file *seq)
{