@@ -1353,20 +1353,19 @@ static void __net_exit ip6mr_net_exit(struct net *net)
ip6mr_notifier_exit(net);
}
-static void __net_exit ip6mr_net_exit_batch(struct list_head *net_list)
+static void __net_exit ip6mr_net_exit_batch_rtnl(struct list_head *net_list,
+ struct list_head *dev_to_kill)
{
struct net *net;
- rtnl_lock();
list_for_each_entry(net, net_list, exit_list)
ip6mr_rules_exit(net);
- rtnl_unlock();
}
static struct pernet_operations ip6mr_net_ops = {
.init = ip6mr_net_init,
.exit = ip6mr_net_exit,
- .exit_batch = ip6mr_net_exit_batch,
+ .exit_batch_rtnl = ip6mr_net_exit_batch_rtnl,
};
int __init ip6_mr_init(void)
Using exit_batch_rtnl method instead of exit_batch avoids one rtnl_lock()/rtnl_unlock() pair in netns dismantle. Signed-off-by: Eric Dumazet <edumazet@google.com> --- net/ipv6/ip6mr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)