summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@amazon.com>2025-04-11 13:52:43 -0700
committerJakub Kicinski <kuba@kernel.org>2025-04-14 17:08:45 -0700
commitc57a9c503543cd8829eeaaf88362199e0491c0d7 (patch)
tree1f3459238d5f7b103e9159461afd474ebeb6c415
parent4e53b32d74f052458309a10867e642a8aeafd2f5 (diff)
net: Remove ->exit_batch_rtnl().
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>
-rw-r--r--include/net/net_namespace.h2
-rw-r--r--net/core/net_namespace.c8
2 files changed, 1 insertions, 9 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index b071e6eed9d5..025a7574b275 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -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;
};
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index afaa3d1bda8d..0a2b24af4028 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -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);