From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <horms@kernel.org>,
Kuniyuki Iwashima <kuniyu@amazon.com>,
Kuniyuki Iwashima <kuni1840@gmail.com>, <netdev@vger.kernel.org>,
"Ido Schimmel" <idosch@nvidia.com>,
Nikolay Aleksandrov <razor@blackwall.org>
Subject: [PATCH v2 net-next 09/14] bridge: Convert br_net_exit_batch_rtnl() to ->exit_rtnl().
Date: Fri, 11 Apr 2025 13:52:38 -0700 [thread overview]
Message-ID: <20250411205258.63164-10-kuniyu@amazon.com> (raw)
In-Reply-To: <20250411205258.63164-1-kuniyu@amazon.com>
br_net_exit_batch_rtnl() iterates the dying netns list and
performs the same operation for each.
Let's use ->exit_rtnl().
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
---
net/bridge/br.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/net/bridge/br.c b/net/bridge/br.c
index 183fcb362f9e..c16913aac84c 100644
--- a/net/bridge/br.c
+++ b/net/bridge/br.c
@@ -363,21 +363,20 @@ void br_opt_toggle(struct net_bridge *br, enum net_bridge_opts opt, bool on)
clear_bit(opt, &br->options);
}
-static void __net_exit br_net_exit_batch_rtnl(struct list_head *net_list,
- struct list_head *dev_to_kill)
+static void __net_exit br_net_exit_rtnl(struct net *net,
+ struct list_head *dev_to_kill)
{
struct net_device *dev;
- struct net *net;
- ASSERT_RTNL();
- list_for_each_entry(net, net_list, exit_list)
- for_each_netdev(net, dev)
- if (netif_is_bridge_master(dev))
- br_dev_delete(dev, dev_to_kill);
+ ASSERT_RTNL_NET(net);
+
+ for_each_netdev(net, dev)
+ if (netif_is_bridge_master(dev))
+ br_dev_delete(dev, dev_to_kill);
}
static struct pernet_operations br_net_ops = {
- .exit_batch_rtnl = br_net_exit_batch_rtnl,
+ .exit_rtnl = br_net_exit_rtnl,
};
static const struct stp_proto br_stp_proto = {
--
2.49.0
next prev parent reply other threads:[~2025-04-11 20:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-11 20:52 [PATCH v2 net-next 00/14] net: Convert ->exit_batch_rtnl() to ->exit_rtnl() Kuniyuki Iwashima
2025-04-11 20:52 ` [PATCH v2 net-next 01/14] net: Factorise setup_net() and cleanup_net() Kuniyuki Iwashima
2025-04-11 20:52 ` [PATCH v2 net-next 02/14] net: Add ops_undo_single for module load/unload Kuniyuki Iwashima
2025-04-15 0:01 ` Jakub Kicinski
2025-04-15 0:12 ` Jakub Kicinski
2025-04-15 0:17 ` Kuniyuki Iwashima
2025-04-11 20:52 ` [PATCH v2 net-next 03/14] net: Add ->exit_rtnl() hook to struct pernet_operations Kuniyuki Iwashima
2025-04-11 20:52 ` [PATCH v2 net-next 04/14] nexthop: Convert nexthop_net_exit_batch_rtnl() to ->exit_rtnl() Kuniyuki Iwashima
2025-04-11 20:52 ` [PATCH v2 net-next 05/14] vxlan: Convert vxlan_exit_batch_rtnl() " Kuniyuki Iwashima
2025-04-11 20:52 ` [PATCH v2 net-next 06/14] ipv4: ip_tunnel: Convert ip_tunnel_delete_nets() callers " Kuniyuki Iwashima
2025-04-11 20:52 ` [PATCH v2 net-next 07/14] ipv6: Convert tunnel devices' ->exit_batch_rtnl() " Kuniyuki Iwashima
2025-04-11 20:52 ` [PATCH v2 net-next 08/14] xfrm: Convert xfrmi_exit_batch_rtnl() " Kuniyuki Iwashima
2025-04-11 20:52 ` Kuniyuki Iwashima [this message]
2025-04-11 20:52 ` [PATCH v2 net-next 10/14] bonding: Convert bond_net_exit_batch_rtnl() " Kuniyuki Iwashima
2025-04-11 20:52 ` [PATCH v2 net-next 11/14] gtp: Convert gtp_net_exit_batch_rtnl() " Kuniyuki Iwashima
2025-04-11 20:52 ` [PATCH v2 net-next 12/14] bareudp: Convert bareudp_exit_batch_rtnl() " Kuniyuki Iwashima
2025-04-11 20:52 ` [PATCH v2 net-next 13/14] geneve: Convert geneve_exit_batch_rtnl() " Kuniyuki Iwashima
2025-04-11 20:52 ` [PATCH v2 net-next 14/14] net: Remove ->exit_batch_rtnl() Kuniyuki Iwashima
2025-04-14 14:12 ` [PATCH v2 net-next 00/14] net: Convert ->exit_batch_rtnl() to ->exit_rtnl() Sabrina Dubroca
2025-04-15 0:30 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250411205258.63164-10-kuniyu@amazon.com \
--to=kuniyu@amazon.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.