]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
[NET]: Move unneeded data to initdata section.
authorDenis V. Lunev <den@openvz.org>
Tue, 13 Nov 2007 11:23:50 +0000 (03:23 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Nov 2007 11:23:50 +0000 (03:23 -0800)
This patch reverts Eric's commit 2b008b0a8e96b726c603c5e1a5a7a509b5f61e35

It diets .text & .data section of the kernel if CONFIG_NET_NS is not set.
This is safe after list operations cleanup.

Signed-of-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/loopback.c
fs/proc/proc_net.c
include/net/net_namespace.h
net/core/dev.c
net/core/dev_mcast.c
net/netlink/af_netlink.c

index 45f30a2974b8f49405ec5ab07e4e605c6be60cb8..662b8d16803ce7fec85f59af645b60aabee75c41 100644 (file)
@@ -284,7 +284,7 @@ static __net_exit void loopback_net_exit(struct net *net)
        unregister_netdev(dev);
 }
 
-static struct pernet_operations loopback_net_ops = {
+static struct pernet_operations __net_initdata loopback_net_ops = {
        .init = loopback_net_init,
        .exit = loopback_net_exit,
 };
index 153554cf55752c9b0364a90847e57c07baa25192..131f9c68be5f1d3b2fa036189f7864ca371c63ae 100644 (file)
@@ -178,7 +178,7 @@ static __net_exit void proc_net_ns_exit(struct net *net)
        kfree(net->proc_net_root);
 }
 
-static struct pernet_operations proc_net_ns_ops = {
+static struct pernet_operations __net_initdata proc_net_ns_ops = {
        .init = proc_net_ns_init,
        .exit = proc_net_ns_exit,
 };
index 1fd449a6530b293f040eaa6c21ea40887994ea62..5dd6d90b37eb778dfffde65e4998b0bdb8c8d13b 100644 (file)
@@ -119,9 +119,11 @@ static inline struct net *maybe_get_net(struct net *net)
 #ifdef CONFIG_NET_NS
 #define __net_init
 #define __net_exit
+#define __net_initdata
 #else
 #define __net_init     __init
 #define __net_exit     __exit_refok
+#define __net_initdata __initdata
 #endif
 
 struct pernet_operations {
index dd7e30754cbc4c9705200ef02b227300272912f4..dd40b35bb0060d676944ad68e294ef8fb2dd9a4b 100644 (file)
@@ -2688,7 +2688,7 @@ static void __net_exit dev_proc_net_exit(struct net *net)
        proc_net_remove(net, "dev");
 }
 
-static struct pernet_operations dev_proc_ops = {
+static struct pernet_operations __net_initdata dev_proc_ops = {
        .init = dev_proc_net_init,
        .exit = dev_proc_net_exit,
 };
@@ -4353,7 +4353,7 @@ static void __net_exit netdev_exit(struct net *net)
        kfree(net->dev_index_head);
 }
 
-static struct pernet_operations  netdev_net_ops = {
+static struct pernet_operations __net_initdata netdev_net_ops = {
        .init = netdev_init,
        .exit = netdev_exit,
 };
@@ -4384,7 +4384,7 @@ static void __net_exit default_device_exit(struct net *net)
        rtnl_unlock();
 }
 
-static struct pernet_operations  default_device_ops = {
+static struct pernet_operations __net_initdata default_device_ops = {
        .exit = default_device_exit,
 };
 
index 647973daca2b59f1c09d333c99b1ae3e919ddc52..69fff16ece10c70c3c94d2624a2d1086a23e26a8 100644 (file)
@@ -285,7 +285,7 @@ static void __net_exit dev_mc_net_exit(struct net *net)
        proc_net_remove(net, "dev_mcast");
 }
 
-static struct pernet_operations dev_mc_net_ops = {
+static struct pernet_operations __net_initdata dev_mc_net_ops = {
        .init = dev_mc_net_init,
        .exit = dev_mc_net_exit,
 };
index 415c97236f631d18962fc509dbe0ffee50744b3e..de3988ba1f46c45dd0831caeb71b4de0dedb0a63 100644 (file)
@@ -1888,7 +1888,7 @@ static void __net_exit netlink_net_exit(struct net *net)
 #endif
 }
 
-static struct pernet_operations netlink_net_ops = {
+static struct pernet_operations __net_initdata netlink_net_ops = {
        .init = netlink_net_init,
        .exit = netlink_net_exit,
 };