diff options
author | Nikolay Aleksandrov <nikolay@cumulusnetworks.com> | 2020-09-07 12:56:06 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-09-07 13:16:34 -0700 |
commit | 681590bd4cdc74f17dfbdfa792f027772e149e1d (patch) | |
tree | 3b6278dc6c95f602bae8e17bd774dcb915935525 /net/bridge/br_mdb.c | |
parent | 6ec0d0ee66473469ea85a2da204eefc14c465c5e (diff) | |
download | linux-681590bd4cdc74f17dfbdfa792f027772e149e1d.tar.bz2 |
net: bridge: mcast: factor out port group del
In order to avoid future errors and reduce code duplication we should
factor out the port group del sequence. This allows us to have one
function which takes care of all details when removing a port group.
v4: set pg's fast leave flag when deleting due to fast leave
move the patch before adding source lists
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/bridge/br_mdb.c')
-rw-r--r-- | net/bridge/br_mdb.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c index da5ed4cf9233..9a975e2a2489 100644 --- a/net/bridge/br_mdb.c +++ b/net/bridge/br_mdb.c @@ -764,16 +764,8 @@ static int __br_mdb_del(struct net_bridge *br, struct br_mdb_entry *entry) if (p->port->state == BR_STATE_DISABLED) goto unlock; - __mdb_entry_fill_flags(entry, p->flags); - rcu_assign_pointer(*pp, p->next); - hlist_del_init(&p->mglist); - del_timer(&p->timer); - kfree_rcu(p, rcu); + br_multicast_del_pg(mp, p, pp); err = 0; - - if (!mp->ports && !mp->host_joined && - netif_running(br->dev)) - mod_timer(&mp->timer, jiffies); break; } |