summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@google.com>2026-06-29 18:11:02 +0000
committerPaolo Abeni <pabeni@redhat.com>2026-07-01 18:42:34 +0200
commitffc8a4b9ad2bdee41a207aaf546eef6ee3f19a2c (patch)
tree053a21d0e21a05b6a5e07202fd8cedb08da3021f
parenteef9bddc3313b01679c60892825afd2a7a83fba6 (diff)
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>
-rw-r--r--net/ipv6/fib6_rules.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index 5ab4dde07225..04dab9329d0c 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -635,21 +635,14 @@ out_fib6_rules_ops:
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)