diff mbox series

[v1,net-next,2/2] net: bridge: Remove rcu_read_lock() in br_get_link_af_size_filtered().

Message ID 20240815211137.62280-3-kuniyu@amazon.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series net: Clean up af_ops->{get_link_af_size,fill_link_af}(). | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 29 this patch: 29
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 1 maintainers not CCed: bridge@lists.linux.dev
netdev/build_clang success Errors and warnings before: 29 this patch: 29
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 29 this patch: 29
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest fail net-next-2024-08-16--00-00 (tests: 706)

Commit Message

Kuniyuki Iwashima Aug. 15, 2024, 9:11 p.m. UTC
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 mbox series

Patch

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);