mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
[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>
This commit is contained in:
parent
7708610b1b
commit
77d76ea310
4 changed files with 5 additions and 11 deletions
|
@ -32,7 +32,6 @@
|
||||||
|
|
||||||
#define HAVE_ALLOC_SKB /* For the drivers to know */
|
#define HAVE_ALLOC_SKB /* For the drivers to know */
|
||||||
#define HAVE_ALIGNABLE_SKB /* Ditto 8) */
|
#define HAVE_ALIGNABLE_SKB /* Ditto 8) */
|
||||||
#define SLAB_SKB /* Slabified skbuffs */
|
|
||||||
|
|
||||||
#define CHECKSUM_NONE 0
|
#define CHECKSUM_NONE 0
|
||||||
#define CHECKSUM_HW 1
|
#define CHECKSUM_HW 1
|
||||||
|
|
|
@ -27,7 +27,6 @@ struct __kernel_sockaddr_storage {
|
||||||
#include <linux/compiler.h> /* __user */
|
#include <linux/compiler.h> /* __user */
|
||||||
|
|
||||||
extern int sysctl_somaxconn;
|
extern int sysctl_somaxconn;
|
||||||
extern void sock_init(void);
|
|
||||||
#ifdef CONFIG_PROC_FS
|
#ifdef CONFIG_PROC_FS
|
||||||
struct seq_file;
|
struct seq_file;
|
||||||
extern void socket_seq_show(struct seq_file *seq);
|
extern void socket_seq_show(struct seq_file *seq);
|
||||||
|
|
|
@ -47,7 +47,6 @@
|
||||||
#include <linux/rmap.h>
|
#include <linux/rmap.h>
|
||||||
#include <linux/mempolicy.h>
|
#include <linux/mempolicy.h>
|
||||||
#include <linux/key.h>
|
#include <linux/key.h>
|
||||||
#include <net/sock.h>
|
|
||||||
|
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/bugs.h>
|
#include <asm/bugs.h>
|
||||||
|
@ -614,9 +613,6 @@ static void __init do_basic_setup(void)
|
||||||
sysctl_init();
|
sysctl_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Networking initialization needs a process context */
|
|
||||||
sock_init();
|
|
||||||
|
|
||||||
do_initcalls();
|
do_initcalls();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
10
net/socket.c
10
net/socket.c
|
@ -2036,7 +2036,7 @@ int sock_unregister(int family)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init sock_init(void)
|
static int __init sock_init(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Initialize sock SLAB cache.
|
* Initialize sock SLAB cache.
|
||||||
|
@ -2044,12 +2044,10 @@ void __init sock_init(void)
|
||||||
|
|
||||||
sk_init();
|
sk_init();
|
||||||
|
|
||||||
#ifdef SLAB_SKB
|
|
||||||
/*
|
/*
|
||||||
* Initialize skbuff SLAB cache
|
* Initialize skbuff SLAB cache
|
||||||
*/
|
*/
|
||||||
skb_init();
|
skb_init();
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the protocols module.
|
* Initialize the protocols module.
|
||||||
|
@ -2058,8 +2056,8 @@ void __init sock_init(void)
|
||||||
init_inodecache();
|
init_inodecache();
|
||||||
register_filesystem(&sock_fs_type);
|
register_filesystem(&sock_fs_type);
|
||||||
sock_mnt = kern_mount(&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
|
#ifdef CONFIG_NETFILTER
|
||||||
|
@ -2067,6 +2065,8 @@ void __init sock_init(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
core_initcall(sock_init); /* early initcall */
|
||||||
|
|
||||||
#ifdef CONFIG_PROC_FS
|
#ifdef CONFIG_PROC_FS
|
||||||
void socket_seq_show(struct seq_file *seq)
|
void socket_seq_show(struct seq_file *seq)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue