ipv6: Remove redundant route flushing during namespace dismantle
By the time fib6_net_exit() is executed all the netdevs in the namespace have been either unregistered or pushed back to the default namespace. That is because pernet subsys operations are always ordered before pernet device operations and therefore invoked after them during namespace dismantle. Thus, all the routing tables in the namespace are empty by the time fib6_net_exit() is invoked and the call to rt6_ifdown() can be removed. This allows us to simplify the condition in fib6_ifdown() as it's only ever called with an actual netdev. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Acked-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
7f0b800048
commit
9fcb0714dc
@@ -2103,7 +2103,6 @@ static void fib6_net_exit(struct net *net)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
rt6_ifdown(net, NULL);
|
||||
del_timer_sync(&net->ipv6.ip6_fib_timer);
|
||||
|
||||
for (i = 0; i < FIB6_TABLE_HASHSZ; i++) {
|
||||
|
Reference in New Issue
Block a user