summaryrefslogtreecommitdiffstats
path: root/net/bridge/br_mst.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 21:00:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 21:00:37 +0000
commit94ac2ab3fff96814d7460a27a0e9d004abbd4128 (patch)
tree9a4eb8cc234b540b0f4b93363109cdd37a20540b /net/bridge/br_mst.c
parentAdding debian version 6.8.12-1. (diff)
downloadlinux-94ac2ab3fff96814d7460a27a0e9d004abbd4128.tar.xz
linux-94ac2ab3fff96814d7460a27a0e9d004abbd4128.zip
Merging upstream version 6.9.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'net/bridge/br_mst.c')
-rw-r--r--net/bridge/br_mst.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/net/bridge/br_mst.c b/net/bridge/br_mst.c
index 3c66141d34..ee680adcee 100644
--- a/net/bridge/br_mst.c
+++ b/net/bridge/br_mst.c
@@ -78,7 +78,7 @@ static void br_mst_vlan_set_state(struct net_bridge_port *p, struct net_bridge_v
{
struct net_bridge_vlan_group *vg = nbp_vlan_group(p);
- if (br_vlan_get_state(v) == state)
+ if (v->state == state)
return;
br_vlan_set_state(v, state);
@@ -100,12 +100,11 @@ int br_mst_set_state(struct net_bridge_port *p, u16 msti, u8 state,
};
struct net_bridge_vlan_group *vg;
struct net_bridge_vlan *v;
- int err = 0;
+ int err;
- rcu_read_lock();
vg = nbp_vlan_group(p);
if (!vg)
- goto out;
+ return 0;
/* MSTI 0 (CST) state changes are notified via the regular
* SWITCHDEV_ATTR_ID_PORT_STP_STATE.
@@ -113,20 +112,17 @@ int br_mst_set_state(struct net_bridge_port *p, u16 msti, u8 state,
if (msti) {
err = switchdev_port_attr_set(p->dev, &attr, extack);
if (err && err != -EOPNOTSUPP)
- goto out;
+ return err;
}
- err = 0;
- list_for_each_entry_rcu(v, &vg->vlan_list, vlist) {
+ list_for_each_entry(v, &vg->vlan_list, vlist) {
if (v->brvlan->msti != msti)
continue;
br_mst_vlan_set_state(p, v, state);
}
-out:
- rcu_read_unlock();
- return err;
+ return 0;
}
static void br_mst_vlan_sync_state(struct net_bridge_vlan *pv, u16 msti)