diff options
author | Sven Wegener <sven.wegener@stealer.net> | 2008-08-10 05:18:02 -0400 |
---|---|---|
committer | Sven Wegener <sven.wegener@stealer.net> | 2008-08-11 05:46:06 -0400 |
commit | d149ccc9cf85cdf089c1b2189ade111305712b0c (patch) | |
tree | b6ed306fa7433aac1672c64ff317d92a885eaa81 /net/ipv4 | |
parent | 66a0be47200fff30f8c482ea584052c6affb08cb (diff) |
ipvs: Initialize schedulers' struct list_head at compile time
No need to do it at runtime and this saves a couple of bytes in the text
section.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Acked-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ipvs/ip_vs_dh.c | 2 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_lblc.c | 2 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_lblcr.c | 2 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_lc.c | 2 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_nq.c | 2 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_rr.c | 2 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_sed.c | 2 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_sh.c | 2 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_wlc.c | 2 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_wrr.c | 2 |
10 files changed, 10 insertions, 10 deletions
diff --git a/net/ipv4/ipvs/ip_vs_dh.c b/net/ipv4/ipvs/ip_vs_dh.c index 8afc1503ed20..fa66824d264f 100644 --- a/net/ipv4/ipvs/ip_vs_dh.c +++ b/net/ipv4/ipvs/ip_vs_dh.c | |||
@@ -233,6 +233,7 @@ static struct ip_vs_scheduler ip_vs_dh_scheduler = | |||
233 | .name = "dh", | 233 | .name = "dh", |
234 | .refcnt = ATOMIC_INIT(0), | 234 | .refcnt = ATOMIC_INIT(0), |
235 | .module = THIS_MODULE, | 235 | .module = THIS_MODULE, |
236 | .n_list = LIST_HEAD_INIT(ip_vs_dh_scheduler.n_list), | ||
236 | .init_service = ip_vs_dh_init_svc, | 237 | .init_service = ip_vs_dh_init_svc, |
237 | .done_service = ip_vs_dh_done_svc, | 238 | .done_service = ip_vs_dh_done_svc, |
238 | .update_service = ip_vs_dh_update_svc, | 239 | .update_service = ip_vs_dh_update_svc, |
@@ -242,7 +243,6 @@ static struct ip_vs_scheduler ip_vs_dh_scheduler = | |||
242 | 243 | ||
243 | static int __init ip_vs_dh_init(void) | 244 | static int __init ip_vs_dh_init(void) |
244 | { | 245 | { |
245 | INIT_LIST_HEAD(&ip_vs_dh_scheduler.n_list); | ||
246 | return register_ip_vs_scheduler(&ip_vs_dh_scheduler); | 246 | return register_ip_vs_scheduler(&ip_vs_dh_scheduler); |
247 | } | 247 | } |
248 | 248 | ||
diff --git a/net/ipv4/ipvs/ip_vs_lblc.c b/net/ipv4/ipvs/ip_vs_lblc.c index 0efa3db4b180..7a6a319f544a 100644 --- a/net/ipv4/ipvs/ip_vs_lblc.c +++ b/net/ipv4/ipvs/ip_vs_lblc.c | |||
@@ -539,6 +539,7 @@ static struct ip_vs_scheduler ip_vs_lblc_scheduler = | |||
539 | .name = "lblc", | 539 | .name = "lblc", |
540 | .refcnt = ATOMIC_INIT(0), | 540 | .refcnt = ATOMIC_INIT(0), |
541 | .module = THIS_MODULE, | 541 | .module = THIS_MODULE, |
542 | .n_list = LIST_HEAD_INIT(ip_vs_lblc_scheduler.n_list), | ||
542 | .init_service = ip_vs_lblc_init_svc, | 543 | .init_service = ip_vs_lblc_init_svc, |
543 | .done_service = ip_vs_lblc_done_svc, | 544 | .done_service = ip_vs_lblc_done_svc, |
544 | .update_service = ip_vs_lblc_update_svc, | 545 | .update_service = ip_vs_lblc_update_svc, |
@@ -550,7 +551,6 @@ static int __init ip_vs_lblc_init(void) | |||
550 | { | 551 | { |
551 | int ret; | 552 | int ret; |
552 | 553 | ||
553 | INIT_LIST_HEAD(&ip_vs_lblc_scheduler.n_list); | ||
554 | sysctl_header = register_sysctl_paths(net_vs_ctl_path, vs_vars_table); | 554 | sysctl_header = register_sysctl_paths(net_vs_ctl_path, vs_vars_table); |
555 | ret = register_ip_vs_scheduler(&ip_vs_lblc_scheduler); | 555 | ret = register_ip_vs_scheduler(&ip_vs_lblc_scheduler); |
556 | if (ret) | 556 | if (ret) |
diff --git a/net/ipv4/ipvs/ip_vs_lblcr.c b/net/ipv4/ipvs/ip_vs_lblcr.c index 8e3bbeb45138..c234e73968a6 100644 --- a/net/ipv4/ipvs/ip_vs_lblcr.c +++ b/net/ipv4/ipvs/ip_vs_lblcr.c | |||
@@ -728,6 +728,7 @@ static struct ip_vs_scheduler ip_vs_lblcr_scheduler = | |||
728 | .name = "lblcr", | 728 | .name = "lblcr", |
729 | .refcnt = ATOMIC_INIT(0), | 729 | .refcnt = ATOMIC_INIT(0), |
730 | .module = THIS_MODULE, | 730 | .module = THIS_MODULE, |
731 | .n_list = LIST_HEAD_INIT(ip_vs_lblcr_scheduler.n_list), | ||
731 | .init_service = ip_vs_lblcr_init_svc, | 732 | .init_service = ip_vs_lblcr_init_svc, |
732 | .done_service = ip_vs_lblcr_done_svc, | 733 | .done_service = ip_vs_lblcr_done_svc, |
733 | .update_service = ip_vs_lblcr_update_svc, | 734 | .update_service = ip_vs_lblcr_update_svc, |
@@ -739,7 +740,6 @@ static int __init ip_vs_lblcr_init(void) | |||
739 | { | 740 | { |
740 | int ret; | 741 | int ret; |
741 | 742 | ||
742 | INIT_LIST_HEAD(&ip_vs_lblcr_scheduler.n_list); | ||
743 | sysctl_header = register_sysctl_paths(net_vs_ctl_path, vs_vars_table); | 743 | sysctl_header = register_sysctl_paths(net_vs_ctl_path, vs_vars_table); |
744 | ret = register_ip_vs_scheduler(&ip_vs_lblcr_scheduler); | 744 | ret = register_ip_vs_scheduler(&ip_vs_lblcr_scheduler); |
745 | if (ret) | 745 | if (ret) |
diff --git a/net/ipv4/ipvs/ip_vs_lc.c b/net/ipv4/ipvs/ip_vs_lc.c index ac9f08e065d5..ebcdbf75ac65 100644 --- a/net/ipv4/ipvs/ip_vs_lc.c +++ b/net/ipv4/ipvs/ip_vs_lc.c | |||
@@ -98,6 +98,7 @@ static struct ip_vs_scheduler ip_vs_lc_scheduler = { | |||
98 | .name = "lc", | 98 | .name = "lc", |
99 | .refcnt = ATOMIC_INIT(0), | 99 | .refcnt = ATOMIC_INIT(0), |
100 | .module = THIS_MODULE, | 100 | .module = THIS_MODULE, |
101 | .n_list = LIST_HEAD_INIT(ip_vs_lc_scheduler.n_list), | ||
101 | .init_service = ip_vs_lc_init_svc, | 102 | .init_service = ip_vs_lc_init_svc, |
102 | .done_service = ip_vs_lc_done_svc, | 103 | .done_service = ip_vs_lc_done_svc, |
103 | .update_service = ip_vs_lc_update_svc, | 104 | .update_service = ip_vs_lc_update_svc, |
@@ -107,7 +108,6 @@ static struct ip_vs_scheduler ip_vs_lc_scheduler = { | |||
107 | 108 | ||
108 | static int __init ip_vs_lc_init(void) | 109 | static int __init ip_vs_lc_init(void) |
109 | { | 110 | { |
110 | INIT_LIST_HEAD(&ip_vs_lc_scheduler.n_list); | ||
111 | return register_ip_vs_scheduler(&ip_vs_lc_scheduler) ; | 111 | return register_ip_vs_scheduler(&ip_vs_lc_scheduler) ; |
112 | } | 112 | } |
113 | 113 | ||
diff --git a/net/ipv4/ipvs/ip_vs_nq.c b/net/ipv4/ipvs/ip_vs_nq.c index a46bf258d420..92f3a6770031 100644 --- a/net/ipv4/ipvs/ip_vs_nq.c +++ b/net/ipv4/ipvs/ip_vs_nq.c | |||
@@ -136,6 +136,7 @@ static struct ip_vs_scheduler ip_vs_nq_scheduler = | |||
136 | .name = "nq", | 136 | .name = "nq", |
137 | .refcnt = ATOMIC_INIT(0), | 137 | .refcnt = ATOMIC_INIT(0), |
138 | .module = THIS_MODULE, | 138 | .module = THIS_MODULE, |
139 | .n_list = LIST_HEAD_INIT(ip_vs_nq_scheduler.n_list), | ||
139 | .init_service = ip_vs_nq_init_svc, | 140 | .init_service = ip_vs_nq_init_svc, |
140 | .done_service = ip_vs_nq_done_svc, | 141 | .done_service = ip_vs_nq_done_svc, |
141 | .update_service = ip_vs_nq_update_svc, | 142 | .update_service = ip_vs_nq_update_svc, |
@@ -145,7 +146,6 @@ static struct ip_vs_scheduler ip_vs_nq_scheduler = | |||
145 | 146 | ||
146 | static int __init ip_vs_nq_init(void) | 147 | static int __init ip_vs_nq_init(void) |
147 | { | 148 | { |
148 | INIT_LIST_HEAD(&ip_vs_nq_scheduler.n_list); | ||
149 | return register_ip_vs_scheduler(&ip_vs_nq_scheduler); | 149 | return register_ip_vs_scheduler(&ip_vs_nq_scheduler); |
150 | } | 150 | } |
151 | 151 | ||
diff --git a/net/ipv4/ipvs/ip_vs_rr.c b/net/ipv4/ipvs/ip_vs_rr.c index c8db12d39e61..358110d17e59 100644 --- a/net/ipv4/ipvs/ip_vs_rr.c +++ b/net/ipv4/ipvs/ip_vs_rr.c | |||
@@ -94,6 +94,7 @@ static struct ip_vs_scheduler ip_vs_rr_scheduler = { | |||
94 | .name = "rr", /* name */ | 94 | .name = "rr", /* name */ |
95 | .refcnt = ATOMIC_INIT(0), | 95 | .refcnt = ATOMIC_INIT(0), |
96 | .module = THIS_MODULE, | 96 | .module = THIS_MODULE, |
97 | .n_list = LIST_HEAD_INIT(ip_vs_rr_scheduler.n_list), | ||
97 | .init_service = ip_vs_rr_init_svc, | 98 | .init_service = ip_vs_rr_init_svc, |
98 | .done_service = ip_vs_rr_done_svc, | 99 | .done_service = ip_vs_rr_done_svc, |
99 | .update_service = ip_vs_rr_update_svc, | 100 | .update_service = ip_vs_rr_update_svc, |
@@ -102,7 +103,6 @@ static struct ip_vs_scheduler ip_vs_rr_scheduler = { | |||
102 | 103 | ||
103 | static int __init ip_vs_rr_init(void) | 104 | static int __init ip_vs_rr_init(void) |
104 | { | 105 | { |
105 | INIT_LIST_HEAD(&ip_vs_rr_scheduler.n_list); | ||
106 | return register_ip_vs_scheduler(&ip_vs_rr_scheduler); | 106 | return register_ip_vs_scheduler(&ip_vs_rr_scheduler); |
107 | } | 107 | } |
108 | 108 | ||
diff --git a/net/ipv4/ipvs/ip_vs_sed.c b/net/ipv4/ipvs/ip_vs_sed.c index 2a7d31358181..77663d84cbd1 100644 --- a/net/ipv4/ipvs/ip_vs_sed.c +++ b/net/ipv4/ipvs/ip_vs_sed.c | |||
@@ -138,6 +138,7 @@ static struct ip_vs_scheduler ip_vs_sed_scheduler = | |||
138 | .name = "sed", | 138 | .name = "sed", |
139 | .refcnt = ATOMIC_INIT(0), | 139 | .refcnt = ATOMIC_INIT(0), |
140 | .module = THIS_MODULE, | 140 | .module = THIS_MODULE, |
141 | .n_list = LIST_HEAD_INIT(ip_vs_sed_scheduler.n_list), | ||
141 | .init_service = ip_vs_sed_init_svc, | 142 | .init_service = ip_vs_sed_init_svc, |
142 | .done_service = ip_vs_sed_done_svc, | 143 | .done_service = ip_vs_sed_done_svc, |
143 | .update_service = ip_vs_sed_update_svc, | 144 | .update_service = ip_vs_sed_update_svc, |
@@ -147,7 +148,6 @@ static struct ip_vs_scheduler ip_vs_sed_scheduler = | |||
147 | 148 | ||
148 | static int __init ip_vs_sed_init(void) | 149 | static int __init ip_vs_sed_init(void) |
149 | { | 150 | { |
150 | INIT_LIST_HEAD(&ip_vs_sed_scheduler.n_list); | ||
151 | return register_ip_vs_scheduler(&ip_vs_sed_scheduler); | 151 | return register_ip_vs_scheduler(&ip_vs_sed_scheduler); |
152 | } | 152 | } |
153 | 153 | ||
diff --git a/net/ipv4/ipvs/ip_vs_sh.c b/net/ipv4/ipvs/ip_vs_sh.c index b8fdfac65001..7b979e228056 100644 --- a/net/ipv4/ipvs/ip_vs_sh.c +++ b/net/ipv4/ipvs/ip_vs_sh.c | |||
@@ -230,6 +230,7 @@ static struct ip_vs_scheduler ip_vs_sh_scheduler = | |||
230 | .name = "sh", | 230 | .name = "sh", |
231 | .refcnt = ATOMIC_INIT(0), | 231 | .refcnt = ATOMIC_INIT(0), |
232 | .module = THIS_MODULE, | 232 | .module = THIS_MODULE, |
233 | .n_list = LIST_HEAD_INIT(ip_vs_sh_scheduler.n_list), | ||
233 | .init_service = ip_vs_sh_init_svc, | 234 | .init_service = ip_vs_sh_init_svc, |
234 | .done_service = ip_vs_sh_done_svc, | 235 | .done_service = ip_vs_sh_done_svc, |
235 | .update_service = ip_vs_sh_update_svc, | 236 | .update_service = ip_vs_sh_update_svc, |
@@ -239,7 +240,6 @@ static struct ip_vs_scheduler ip_vs_sh_scheduler = | |||
239 | 240 | ||
240 | static int __init ip_vs_sh_init(void) | 241 | static int __init ip_vs_sh_init(void) |
241 | { | 242 | { |
242 | INIT_LIST_HEAD(&ip_vs_sh_scheduler.n_list); | ||
243 | return register_ip_vs_scheduler(&ip_vs_sh_scheduler); | 243 | return register_ip_vs_scheduler(&ip_vs_sh_scheduler); |
244 | } | 244 | } |
245 | 245 | ||
diff --git a/net/ipv4/ipvs/ip_vs_wlc.c b/net/ipv4/ipvs/ip_vs_wlc.c index 772c3cb4eca1..9b0ef86bb1f7 100644 --- a/net/ipv4/ipvs/ip_vs_wlc.c +++ b/net/ipv4/ipvs/ip_vs_wlc.c | |||
@@ -126,6 +126,7 @@ static struct ip_vs_scheduler ip_vs_wlc_scheduler = | |||
126 | .name = "wlc", | 126 | .name = "wlc", |
127 | .refcnt = ATOMIC_INIT(0), | 127 | .refcnt = ATOMIC_INIT(0), |
128 | .module = THIS_MODULE, | 128 | .module = THIS_MODULE, |
129 | .n_list = LIST_HEAD_INIT(ip_vs_wlc_scheduler.n_list), | ||
129 | .init_service = ip_vs_wlc_init_svc, | 130 | .init_service = ip_vs_wlc_init_svc, |
130 | .done_service = ip_vs_wlc_done_svc, | 131 | .done_service = ip_vs_wlc_done_svc, |
131 | .update_service = ip_vs_wlc_update_svc, | 132 | .update_service = ip_vs_wlc_update_svc, |
@@ -135,7 +136,6 @@ static struct ip_vs_scheduler ip_vs_wlc_scheduler = | |||
135 | 136 | ||
136 | static int __init ip_vs_wlc_init(void) | 137 | static int __init ip_vs_wlc_init(void) |
137 | { | 138 | { |
138 | INIT_LIST_HEAD(&ip_vs_wlc_scheduler.n_list); | ||
139 | return register_ip_vs_scheduler(&ip_vs_wlc_scheduler); | 139 | return register_ip_vs_scheduler(&ip_vs_wlc_scheduler); |
140 | } | 140 | } |
141 | 141 | ||
diff --git a/net/ipv4/ipvs/ip_vs_wrr.c b/net/ipv4/ipvs/ip_vs_wrr.c index 1d6932d7dc97..0d86a79b87b5 100644 --- a/net/ipv4/ipvs/ip_vs_wrr.c +++ b/net/ipv4/ipvs/ip_vs_wrr.c | |||
@@ -212,6 +212,7 @@ static struct ip_vs_scheduler ip_vs_wrr_scheduler = { | |||
212 | .name = "wrr", | 212 | .name = "wrr", |
213 | .refcnt = ATOMIC_INIT(0), | 213 | .refcnt = ATOMIC_INIT(0), |
214 | .module = THIS_MODULE, | 214 | .module = THIS_MODULE, |
215 | .n_list = LIST_HEAD_INIT(ip_vs_wrr_scheduler.n_list), | ||
215 | .init_service = ip_vs_wrr_init_svc, | 216 | .init_service = ip_vs_wrr_init_svc, |
216 | .done_service = ip_vs_wrr_done_svc, | 217 | .done_service = ip_vs_wrr_done_svc, |
217 | .update_service = ip_vs_wrr_update_svc, | 218 | .update_service = ip_vs_wrr_update_svc, |
@@ -220,7 +221,6 @@ static struct ip_vs_scheduler ip_vs_wrr_scheduler = { | |||
220 | 221 | ||
221 | static int __init ip_vs_wrr_init(void) | 222 | static int __init ip_vs_wrr_init(void) |
222 | { | 223 | { |
223 | INIT_LIST_HEAD(&ip_vs_wrr_scheduler.n_list); | ||
224 | return register_ip_vs_scheduler(&ip_vs_wrr_scheduler) ; | 224 | return register_ip_vs_scheduler(&ip_vs_wrr_scheduler) ; |
225 | } | 225 | } |
226 | 226 | ||