Skip to content

Commit

Permalink
net: fib: Decrease one unnecessary rt cache flush in fib_disable_ip
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
gfreewind authored and davem330 committed Apr 27, 2017
1 parent 1514dc8 commit 06b4fc5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/ipv4/fib_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 06b4fc5

Please sign in to comment.