From: Eric Dumazet Date: Wed, 13 Oct 2010 02:45:40 +0000 (+0000) Subject: fib6: use FIB_LOOKUP_NOREF in fib6_rule_lookup() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2c1c00040af3d187b7d602dd53b5adbbf3a4caa4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git fib6: use FIB_LOOKUP_NOREF in fib6_rule_lookup() Avoid two atomic ops on found rule in fib6_rule_lookup() Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index b1108ede18e1..d829874d8946 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c @@ -34,11 +34,10 @@ struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi *fl, { struct fib_lookup_arg arg = { .lookup_ptr = lookup, + .flags = FIB_LOOKUP_NOREF, }; fib_rules_lookup(net->ipv6.fib6_rules_ops, fl, flags, &arg); - if (arg.rule) - fib_rule_put(arg.rule); if (arg.result) return arg.result;