diff options
author | Denis V. Lunev <den@openvz.org> | 2007-09-16 18:44:27 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:51:22 -0400 |
commit | 76c72d4f44ec5fb7f88eda8a0d3aa30922c891d1 (patch) | |
tree | 0c773487ff11d098a70fddbc631f153260614bdb /net/ipv6/fib6_rules.c | |
parent | 056925ab3145713e5e83cf8e05ae6fb2f4ace41e (diff) |
[IPV4/IPV6/DECNET]: Small cleanup for fib rules.
This patch slightly cleanups FIB rules framework. rules_list as a pointer
on struct fib_rules_ops is useless. It is always assigned with a static
per/subsystem list in IPv4, IPv6 and DecNet.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/fib6_rules.c')
-rw-r--r-- | net/ipv6/fib6_rules.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index 53b3998a486c..706622af206f 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c | |||
@@ -50,8 +50,6 @@ static struct fib6_rule local_rule = { | |||
50 | }, | 50 | }, |
51 | }; | 51 | }; |
52 | 52 | ||
53 | static LIST_HEAD(fib6_rules); | ||
54 | |||
55 | struct dst_entry *fib6_rule_lookup(struct flowi *fl, int flags, | 53 | struct dst_entry *fib6_rule_lookup(struct flowi *fl, int flags, |
56 | pol_lookup_t lookup) | 54 | pol_lookup_t lookup) |
57 | { | 55 | { |
@@ -268,14 +266,14 @@ static struct fib_rules_ops fib6_rules_ops = { | |||
268 | .nlmsg_payload = fib6_rule_nlmsg_payload, | 266 | .nlmsg_payload = fib6_rule_nlmsg_payload, |
269 | .nlgroup = RTNLGRP_IPV6_RULE, | 267 | .nlgroup = RTNLGRP_IPV6_RULE, |
270 | .policy = fib6_rule_policy, | 268 | .policy = fib6_rule_policy, |
271 | .rules_list = &fib6_rules, | 269 | .rules_list = LIST_HEAD_INIT(fib6_rules_ops.rules_list), |
272 | .owner = THIS_MODULE, | 270 | .owner = THIS_MODULE, |
273 | }; | 271 | }; |
274 | 272 | ||
275 | void __init fib6_rules_init(void) | 273 | void __init fib6_rules_init(void) |
276 | { | 274 | { |
277 | list_add_tail(&local_rule.common.list, &fib6_rules); | 275 | list_add_tail(&local_rule.common.list, &fib6_rules_ops.rules_list); |
278 | list_add_tail(&main_rule.common.list, &fib6_rules); | 276 | list_add_tail(&main_rule.common.list, &fib6_rules_ops.rules_list); |
279 | 277 | ||
280 | fib_rules_register(&fib6_rules_ops); | 278 | fib_rules_register(&fib6_rules_ops); |
281 | } | 279 | } |