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