[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250410022004.8668-15-kuniyu@amazon.com>
Date: Wed, 9 Apr 2025 19:19:35 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
<pabeni@...hat.com>
CC: Simon Horman <horms@...nel.org>, Kuniyuki Iwashima <kuniyu@...zon.com>,
Kuniyuki Iwashima <kuni1840@...il.com>, <netdev@...r.kernel.org>
Subject: [PATCH v1 net-next 14/14] net: Remove ->exit_batch_rtnl().
There are no ->exit_batch_rtnl() users remaining.
Let's remove the hook.
Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
---
include/net/net_namespace.h | 2 --
net/core/net_namespace.c | 8 +-------
2 files changed, 1 insertion(+), 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 7ea818342721..9ab3ba930d76 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);
--
2.49.0
Powered by blists - more mailing lists