Patchwork [08/10,net-next] net:ipv4:af_inet: Init proc fs before ip_init

login
register
mail settings
Submitter Igor Maravić
Date Dec. 16, 2011, 3:26 p.m.
Message ID <1324049163-11207-9-git-send-email-igorm@etf.rs>
Download mbox | patch
Permalink /patch/131840/
State Rejected
Delegated to: David Miller
Headers show

Comments

Igor Maravić - Dec. 16, 2011, 3:26 p.m.
From: Igor Maravic <igorm@etf.rs>

Moved ipv4_proc_init() before ip_init().
Did that, so the proc fs for ipv4 would be initialised
before we initialise devinet. If I didn't do that,
per device proc files couldn't be created

Signed-off-by: Igor Maravic <igorm@etf.rs>
---
 net/ipv4/af_inet.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

Patch

diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index f7b5670..7384a20 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1695,6 +1695,11 @@  static int __init inet_init(void)
 
 	for (q = inetsw_array; q < &inetsw_array[INETSW_ARRAY_LEN]; ++q)
 		inet_register_protosw(q);
+		
+	/*
+	 * Init proc fs
+	 */
+	ipv4_proc_init();
 
 	/*
 	 *	Set the ARP module up
@@ -1742,8 +1747,6 @@  static int __init inet_init(void)
 	if (init_ipv4_mibs())
 		printk(KERN_CRIT "inet_init: Cannot init ipv4 mibs\n");
 
-	ipv4_proc_init();
-
 	ipfrag_init();
 
 	dev_add_pack(&ip_packet_type);