diff options
author | Gao Feng <fgao@ikuai8.com> | 2017-04-26 13:04:04 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-27 22:33:30 +0200 |
commit | 06b4fc520d21b7a6327983d64373505859672e91 (patch) | |
tree | d0abbfdff4e030032326768ceff06967d83bb25a /net/ipv4/fib_frontend.c | |
parent | l2tp: remove useless device duplication test in l2tp_eth_create() (diff) | |
download | linux-06b4fc520d21b7a6327983d64373505859672e91.tar.xz linux-06b4fc520d21b7a6327983d64373505859672e91.zip |
net: fib: Decrease one unnecessary rt cache flush in fib_disable_ip
The func fib_flush already flushes the rt cache if necessary, so it
is not necessary to invoke rt_cache_flush again in fib_disable_ip.
Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r-- | net/ipv4/fib_frontend.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 5a0e456b5d58..39bd1edee676 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c @@ -1130,7 +1130,8 @@ static void fib_disable_ip(struct net_device *dev, unsigned long event, { if (fib_sync_down_dev(dev, event, force)) fib_flush(dev_net(dev)); - rt_cache_flush(dev_net(dev)); + else + rt_cache_flush(dev_net(dev)); arp_ifdown(dev); } |