]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: Remove ->exit_batch_rtnl().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 11 Apr 2025 20:52:43 +0000 (13:52 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 15 Apr 2025 00:08:45 +0000 (17:08 -0700)
There are no ->exit_batch_rtnl() users remaining.

Let's remove the hook.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://patch.msgid.link/20250411205258.63164-15-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/net_namespace.h
net/core/net_namespace.c

index b071e6eed9d528bf3c0b0e8b55e43fea318a8132..025a7574b275f34b7757cb64cd5dfb9a1aeb5169 100644 (file)
@@ -477,8 +477,6 @@ struct pernet_operations {
        /* Following method is called with RTNL held. */
        void (*exit_rtnl)(struct net *net,
                          struct list_head *dev_kill_list);
-       void (*exit_batch_rtnl)(struct list_head *net_exit_list,
-                               struct list_head *dev_kill_list);
        unsigned int * const id;
        const size_t size;
 };
index afaa3d1bda8d5bf75b25d7e907e0f98c57eb0f84..0a2b24af4028048c3520b3ad23e96bff9056f194 100644 (file)
@@ -185,12 +185,6 @@ static void ops_exit_rtnl_list(const struct list_head *ops_list,
                __rtnl_net_unlock(net);
        }
 
-       ops = saved_ops;
-       list_for_each_entry_continue_reverse(ops, ops_list, list) {
-               if (ops->exit_batch_rtnl)
-                       ops->exit_batch_rtnl(net_exit_list, &dev_kill_list);
-       }
-
        unregister_netdevice_many(&dev_kill_list);
 
        rtnl_unlock();
@@ -263,7 +257,7 @@ static void ops_undo_list(const struct list_head *ops_list,
 static void ops_undo_single(struct pernet_operations *ops,
                            struct list_head *net_exit_list)
 {
-       bool hold_rtnl = ops->exit_rtnl || ops->exit_batch_rtnl;
+       bool hold_rtnl = !!ops->exit_rtnl;
        LIST_HEAD(ops_list);
 
        list_add(&ops->list, &ops_list);