diff options
Diffstat (limited to 'net/decnet')
-rw-r--r-- | net/decnet/dn_rules.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c index 84ff3dd37070..ddd3f04f0919 100644 --- a/net/decnet/dn_rules.c +++ b/net/decnet/dn_rules.c | |||
@@ -57,8 +57,6 @@ static struct dn_fib_rule default_rule = { | |||
57 | }, | 57 | }, |
58 | }; | 58 | }; |
59 | 59 | ||
60 | static LIST_HEAD(dn_fib_rules); | ||
61 | |||
62 | 60 | ||
63 | int dn_fib_lookup(struct flowi *flp, struct dn_fib_res *res) | 61 | int dn_fib_lookup(struct flowi *flp, struct dn_fib_res *res) |
64 | { | 62 | { |
@@ -228,9 +226,9 @@ static u32 dn_fib_rule_default_pref(void) | |||
228 | struct list_head *pos; | 226 | struct list_head *pos; |
229 | struct fib_rule *rule; | 227 | struct fib_rule *rule; |
230 | 228 | ||
231 | if (!list_empty(&dn_fib_rules)) { | 229 | if (!list_empty(&dn_fib_rules_ops.rules_list)) { |
232 | pos = dn_fib_rules.next; | 230 | pos = dn_fib_rules_ops.rules_list.next; |
233 | if (pos->next != &dn_fib_rules) { | 231 | if (pos->next != &dn_fib_rules_ops.rules_list) { |
234 | rule = list_entry(pos->next, struct fib_rule, list); | 232 | rule = list_entry(pos->next, struct fib_rule, list); |
235 | if (rule->pref) | 233 | if (rule->pref) |
236 | return rule->pref - 1; | 234 | return rule->pref - 1; |
@@ -258,13 +256,14 @@ static struct fib_rules_ops dn_fib_rules_ops = { | |||
258 | .flush_cache = dn_fib_rule_flush_cache, | 256 | .flush_cache = dn_fib_rule_flush_cache, |
259 | .nlgroup = RTNLGRP_DECnet_RULE, | 257 | .nlgroup = RTNLGRP_DECnet_RULE, |
260 | .policy = dn_fib_rule_policy, | 258 | .policy = dn_fib_rule_policy, |
261 | .rules_list = &dn_fib_rules, | 259 | .rules_list = LIST_HEAD_INIT(dn_fib_rules_ops.rules_list), |
262 | .owner = THIS_MODULE, | 260 | .owner = THIS_MODULE, |
263 | }; | 261 | }; |
264 | 262 | ||
265 | void __init dn_fib_rules_init(void) | 263 | void __init dn_fib_rules_init(void) |
266 | { | 264 | { |
267 | list_add_tail(&default_rule.common.list, &dn_fib_rules); | 265 | list_add_tail(&default_rule.common.list, |
266 | &dn_fib_rules_ops.rules_list); | ||
268 | fib_rules_register(&dn_fib_rules_ops); | 267 | fib_rules_register(&dn_fib_rules_ops); |
269 | } | 268 | } |
270 | 269 | ||