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>,
David Ahern <dsahern@kernel.org>, Roopa Prabhu <roopa@nvidia.com>,
Nikolay Aleksandrov <razor@blackwall.org>
Cc: Kuniyuki Iwashima <kuniyu@amazon.com>,
Kuniyuki Iwashima <kuni1840@gmail.com>, <netdev@vger.kernel.org>
Subject: [PATCH v1 net-next 2/2] net: bridge: Remove rcu_read_lock() in br_get_link_af_size_filtered().
Date: Thu, 15 Aug 2024 14:11:37 -0700 [thread overview]
Message-ID: <20240815211137.62280-3-kuniyu@amazon.com> (raw)
In-Reply-To: <20240815211137.62280-1-kuniyu@amazon.com>
Since commit 5fa85a09390c ("net: core: rcu-ify rtnl af_ops"),
af_ops->get_link_af_size() is called under RCU.
Let's remove unnecessary rcu_read_lock() in br_get_link_af_size_filtered().
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
---
net/bridge/br_netlink.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index f17dbac7d828..c386a8ec370f 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -101,7 +101,6 @@ static size_t br_get_link_af_size_filtered(const struct net_device *dev,
size_t vinfo_sz = 0;
int num_vlan_infos;
- rcu_read_lock();
if (netif_is_bridge_port(dev)) {
p = br_port_get_check_rcu(dev);
if (p)
@@ -111,7 +110,6 @@ static size_t br_get_link_af_size_filtered(const struct net_device *dev,
vg = br_vlan_group_rcu(br);
}
num_vlan_infos = br_get_num_vlan_infos(vg, filter_mask);
- rcu_read_unlock();
if (p && (p->flags & BR_VLAN_TUNNEL))
vinfo_sz += br_get_vlan_tunnel_info_size(vg);
--
2.30.2
next prev parent reply other threads:[~2024-08-15 21:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-15 21:11 [PATCH v1 net-next 0/2] net: Clean up af_ops->{get_link_af_size,fill_link_af}() Kuniyuki Iwashima
2024-08-15 21:11 ` [PATCH v1 net-next 1/2] ipv4: Use RCU helper in inet_get_link_af_size() and inet_fill_link_af() Kuniyuki Iwashima
2024-08-15 21:11 ` Kuniyuki Iwashima [this message]
2024-08-16 1:36 ` [PATCH v1 net-next 0/2] net: Clean up af_ops->{get_link_af_size,fill_link_af}() Jakub Kicinski
2024-08-16 2:39 ` Kuniyuki Iwashima
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=20240815211137.62280-3-kuniyu@amazon.com \
--to=kuniyu@amazon.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
--cc=roopa@nvidia.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).