diff options
author | Denis V. Lunev <den@openvz.org> | 2007-11-13 06:23:50 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-11-13 06:23:50 -0500 |
commit | 022cbae611a37eda80d498f8f379794c8ac3be47 (patch) | |
tree | c6fe8fe45748127c916d32ec97601c435065d5cb | |
parent | ed160e839d2e1118529e58b04d52dba703ca629c (diff) |
[NET]: Move unneeded data to initdata section.
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>
-rw-r--r-- | drivers/net/loopback.c | 2 | ||||
-rw-r--r-- | fs/proc/proc_net.c | 2 | ||||
-rw-r--r-- | include/net/net_namespace.h | 2 | ||||
-rw-r--r-- | net/core/dev.c | 6 | ||||
-rw-r--r-- | net/core/dev_mcast.c | 2 | ||||
-rw-r--r-- | net/netlink/af_netlink.c | 2 |
6 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index 45f30a2974b8..662b8d16803c 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c | |||
@@ -284,7 +284,7 @@ static __net_exit void loopback_net_exit(struct net *net) | |||
284 | unregister_netdev(dev); | 284 | unregister_netdev(dev); |
285 | } | 285 | } |
286 | 286 | ||
287 | static struct pernet_operations loopback_net_ops = { | 287 | static struct pernet_operations __net_initdata loopback_net_ops = { |
288 | .init = loopback_net_init, | 288 | .init = loopback_net_init, |
289 | .exit = loopback_net_exit, | 289 | .exit = loopback_net_exit, |
290 | }; | 290 | }; |
diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c index 153554cf5575..131f9c68be5f 100644 --- a/fs/proc/proc_net.c +++ b/fs/proc/proc_net.c | |||
@@ -178,7 +178,7 @@ static __net_exit void proc_net_ns_exit(struct net *net) | |||
178 | kfree(net->proc_net_root); | 178 | kfree(net->proc_net_root); |
179 | } | 179 | } |
180 | 180 | ||
181 | static struct pernet_operations proc_net_ns_ops = { | 181 | static struct pernet_operations __net_initdata proc_net_ns_ops = { |
182 | .init = proc_net_ns_init, | 182 | .init = proc_net_ns_init, |
183 | .exit = proc_net_ns_exit, | 183 | .exit = proc_net_ns_exit, |
184 | }; | 184 | }; |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 1fd449a6530b..5dd6d90b37eb 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -119,9 +119,11 @@ static inline struct net *maybe_get_net(struct net *net) | |||
119 | #ifdef CONFIG_NET_NS | 119 | #ifdef CONFIG_NET_NS |
120 | #define __net_init | 120 | #define __net_init |
121 | #define __net_exit | 121 | #define __net_exit |
122 | #define __net_initdata | ||
122 | #else | 123 | #else |
123 | #define __net_init __init | 124 | #define __net_init __init |
124 | #define __net_exit __exit_refok | 125 | #define __net_exit __exit_refok |
126 | #define __net_initdata __initdata | ||
125 | #endif | 127 | #endif |
126 | 128 | ||
127 | struct pernet_operations { | 129 | struct pernet_operations { |
diff --git a/net/core/dev.c b/net/core/dev.c index dd7e30754cbc..dd40b35bb006 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2688,7 +2688,7 @@ static void __net_exit dev_proc_net_exit(struct net *net) | |||
2688 | proc_net_remove(net, "dev"); | 2688 | proc_net_remove(net, "dev"); |
2689 | } | 2689 | } |
2690 | 2690 | ||
2691 | static struct pernet_operations dev_proc_ops = { | 2691 | static struct pernet_operations __net_initdata dev_proc_ops = { |
2692 | .init = dev_proc_net_init, | 2692 | .init = dev_proc_net_init, |
2693 | .exit = dev_proc_net_exit, | 2693 | .exit = dev_proc_net_exit, |
2694 | }; | 2694 | }; |
@@ -4353,7 +4353,7 @@ static void __net_exit netdev_exit(struct net *net) | |||
4353 | kfree(net->dev_index_head); | 4353 | kfree(net->dev_index_head); |
4354 | } | 4354 | } |
4355 | 4355 | ||
4356 | static struct pernet_operations netdev_net_ops = { | 4356 | static struct pernet_operations __net_initdata netdev_net_ops = { |
4357 | .init = netdev_init, | 4357 | .init = netdev_init, |
4358 | .exit = netdev_exit, | 4358 | .exit = netdev_exit, |
4359 | }; | 4359 | }; |
@@ -4384,7 +4384,7 @@ static void __net_exit default_device_exit(struct net *net) | |||
4384 | rtnl_unlock(); | 4384 | rtnl_unlock(); |
4385 | } | 4385 | } |
4386 | 4386 | ||
4387 | static struct pernet_operations default_device_ops = { | 4387 | static struct pernet_operations __net_initdata default_device_ops = { |
4388 | .exit = default_device_exit, | 4388 | .exit = default_device_exit, |
4389 | }; | 4389 | }; |
4390 | 4390 | ||
diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c index 647973daca2b..69fff16ece10 100644 --- a/net/core/dev_mcast.c +++ b/net/core/dev_mcast.c | |||
@@ -285,7 +285,7 @@ static void __net_exit dev_mc_net_exit(struct net *net) | |||
285 | proc_net_remove(net, "dev_mcast"); | 285 | proc_net_remove(net, "dev_mcast"); |
286 | } | 286 | } |
287 | 287 | ||
288 | static struct pernet_operations dev_mc_net_ops = { | 288 | static struct pernet_operations __net_initdata dev_mc_net_ops = { |
289 | .init = dev_mc_net_init, | 289 | .init = dev_mc_net_init, |
290 | .exit = dev_mc_net_exit, | 290 | .exit = dev_mc_net_exit, |
291 | }; | 291 | }; |
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 415c97236f63..de3988ba1f46 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -1888,7 +1888,7 @@ static void __net_exit netlink_net_exit(struct net *net) | |||
1888 | #endif | 1888 | #endif |
1889 | } | 1889 | } |
1890 | 1890 | ||
1891 | static struct pernet_operations netlink_net_ops = { | 1891 | static struct pernet_operations __net_initdata netlink_net_ops = { |
1892 | .init = netlink_net_init, | 1892 | .init = netlink_net_init, |
1893 | .exit = netlink_net_exit, | 1893 | .exit = netlink_net_exit, |
1894 | }; | 1894 | }; |