ipv6: fib_rules: Convert fib6_rules_net_exit_rtnl() to ->exit().

Now fib_rule is protected by per-ops mutex.

fib6_rules_net_exit_batch() no longer needs RTNL.

Let's convert it to ->exit() and drop RTNL.

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260629181226.1929658-11-kuniyu@google.com
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Kuniyuki Iwashima 2026-06-29 18:11:02 +00:00 committed by Paolo Abeni
parent eef9bddc33
commit ffc8a4b9ad

View File

@ -635,21 +635,14 @@ static int __net_init fib6_rules_net_init(struct net *net)
goto out;
}
static void __net_exit fib6_rules_net_exit_batch(struct list_head *net_list)
static void __net_exit fib6_rules_net_exit(struct net *net)
{
struct net *net;
rtnl_lock();
list_for_each_entry(net, net_list, exit_list) {
fib_rules_unregister(net->ipv6.fib6_rules_ops);
cond_resched();
}
rtnl_unlock();
fib_rules_unregister(net->ipv6.fib6_rules_ops);
}
static struct pernet_operations fib6_rules_net_ops = {
.init = fib6_rules_net_init,
.exit_batch = fib6_rules_net_exit_batch,
.exit = fib6_rules_net_exit,
};
int __init fib6_rules_init(void)