diff options
author | Xin Long <lucien.xin@gmail.com> | 2021-11-24 22:39:33 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-11-27 03:47:56 +0300 |
commit | 442b03c32ca1077c75682346a1434eedcdc3e4d4 (patch) | |
tree | 9d12fe867ad0fa0ae0b32aefbcf615174bbfcf1c /net/bridge | |
parent | bde3b0fd8055bf2c00fd20a4e3d65e920c15b443 (diff) | |
download | linux-442b03c32ca1077c75682346a1434eedcdc3e4d4.tar.xz |
bridge: use __set_bit in __br_vlan_set_default_pvid
The same optimization as the one in commit cc0be1ad686f ("net:
bridge: Slightly optimize 'find_portno()'") is needed for the
'changed' bitmap in __br_vlan_set_default_pvid().
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Link: https://lore.kernel.org/r/4e35f415226765e79c2a11d2c96fbf3061c486e2.1637782773.git.lucien.xin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_vlan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index 49e105e0a447..84ba456a78cc 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c @@ -1063,7 +1063,7 @@ int __br_vlan_set_default_pvid(struct net_bridge *br, u16 pvid, if (br_vlan_delete(br, old_pvid)) br_vlan_notify(br, NULL, old_pvid, 0, RTM_DELVLAN); br_vlan_notify(br, NULL, pvid, 0, RTM_NEWVLAN); - set_bit(0, changed); + __set_bit(0, changed); } list_for_each_entry(p, &br->port_list, list) { @@ -1085,7 +1085,7 @@ int __br_vlan_set_default_pvid(struct net_bridge *br, u16 pvid, if (nbp_vlan_delete(p, old_pvid)) br_vlan_notify(br, p, old_pvid, 0, RTM_DELVLAN); br_vlan_notify(p->br, p, pvid, 0, RTM_NEWVLAN); - set_bit(p->port_no, changed); + __set_bit(p->port_no, changed); } br->default_pvid = pvid; |