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>
---
net/ipv6/fib6_rules.c | 13 +++----------
1 file 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 @@ 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)--
2.55.0.rc0.799.gd6f94ed593-goog