diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-03-09 20:03:38 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-16 21:23:19 -0700 |
commit | 2fb3573dfbca0bd853ddc1e47617eb446fa3deae (patch) | |
tree | 790601c538c5b9d1d80bb5f2779c77ebb54354db | |
parent | 14bb4789833a2e2610f30e2d3e1451701ac96ec1 (diff) | |
download | kernel_samsung_espresso10-2fb3573dfbca0bd853ddc1e47617eb446fa3deae.zip kernel_samsung_espresso10-2fb3573dfbca0bd853ddc1e47617eb446fa3deae.tar.gz kernel_samsung_espresso10-2fb3573dfbca0bd853ddc1e47617eb446fa3deae.tar.bz2 |
net: remove rcu locking from fib_rules_event()
We hold RTNL at this point and dont use RCU variants of list traversals,
we dont need rcu_read_lock()/rcu_read_unlock()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/core/fib_rules.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index 9a24377..2ff3489 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -108,7 +108,7 @@ fib_rules_register(struct fib_rules_ops *tmpl, struct net *net) struct fib_rules_ops *ops; int err; - ops = kmemdup(tmpl, sizeof (*ops), GFP_KERNEL); + ops = kmemdup(tmpl, sizeof(*ops), GFP_KERNEL); if (ops == NULL) return ERR_PTR(-ENOMEM); @@ -123,7 +123,6 @@ fib_rules_register(struct fib_rules_ops *tmpl, struct net *net) return ops; } - EXPORT_SYMBOL_GPL(fib_rules_register); void fib_rules_cleanup_ops(struct fib_rules_ops *ops) @@ -157,7 +156,6 @@ void fib_rules_unregister(struct fib_rules_ops *ops) call_rcu(&ops->rcu, fib_rules_put_rcu); } - EXPORT_SYMBOL_GPL(fib_rules_unregister); static int fib_rule_match(struct fib_rule *rule, struct fib_rules_ops *ops, @@ -220,7 +218,6 @@ out: return err; } - EXPORT_SYMBOL_GPL(fib_rules_lookup); static int validate_rulemsg(struct fib_rule_hdr *frh, struct nlattr **tb, @@ -613,7 +610,7 @@ static int fib_nl_dumprule(struct sk_buff *skb, struct netlink_callback *cb) break; cb->args[1] = 0; - skip: +skip: idx++; } rcu_read_unlock(); @@ -685,7 +682,6 @@ static int fib_rules_event(struct notifier_block *this, unsigned long event, struct fib_rules_ops *ops; ASSERT_RTNL(); - rcu_read_lock(); switch (event) { case NETDEV_REGISTER: @@ -699,8 +695,6 @@ static int fib_rules_event(struct notifier_block *this, unsigned long event, break; } - rcu_read_unlock(); - return NOTIFY_DONE; } |