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 <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
725a4a465c
commit
2c1c00040a
1 changed files with 1 additions and 2 deletions
|
@ -34,11 +34,10 @@ struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi *fl,
|
||||||
{
|
{
|
||||||
struct fib_lookup_arg arg = {
|
struct fib_lookup_arg arg = {
|
||||||
.lookup_ptr = lookup,
|
.lookup_ptr = lookup,
|
||||||
|
.flags = FIB_LOOKUP_NOREF,
|
||||||
};
|
};
|
||||||
|
|
||||||
fib_rules_lookup(net->ipv6.fib6_rules_ops, fl, flags, &arg);
|
fib_rules_lookup(net->ipv6.fib6_rules_ops, fl, flags, &arg);
|
||||||
if (arg.rule)
|
|
||||||
fib_rule_put(arg.rule);
|
|
||||||
|
|
||||||
if (arg.result)
|
if (arg.result)
|
||||||
return arg.result;
|
return arg.result;
|
||||||
|
|
Loading…
Reference in a new issue