aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_if.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bridge/br_if.c')
-rw-r--r--net/bridge/br_if.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index c3b77dceb937..f603e5b0b930 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -160,9 +160,10 @@ static void del_nbp(struct net_bridge_port *p)
160 call_rcu(&p->rcu, destroy_nbp_rcu); 160 call_rcu(&p->rcu, destroy_nbp_rcu);
161} 161}
162 162
163/* called with RTNL */ 163/* Delete bridge device */
164static void del_br(struct net_bridge *br, struct list_head *head) 164void br_dev_delete(struct net_device *dev, struct list_head *head)
165{ 165{
166 struct net_bridge *br = netdev_priv(dev);
166 struct net_bridge_port *p, *n; 167 struct net_bridge_port *p, *n;
167 168
168 list_for_each_entry_safe(p, n, &br->port_list, list) { 169 list_for_each_entry_safe(p, n, &br->port_list, list) {
@@ -267,7 +268,7 @@ int br_del_bridge(struct net *net, const char *name)
267 } 268 }
268 269
269 else 270 else
270 del_br(netdev_priv(dev), NULL); 271 br_dev_delete(dev, NULL);
271 272
272 rtnl_unlock(); 273 rtnl_unlock();
273 return ret; 274 return ret;
@@ -446,7 +447,7 @@ void __net_exit br_net_exit(struct net *net)
446 rtnl_lock(); 447 rtnl_lock();
447 for_each_netdev(net, dev) 448 for_each_netdev(net, dev)
448 if (dev->priv_flags & IFF_EBRIDGE) 449 if (dev->priv_flags & IFF_EBRIDGE)
449 del_br(netdev_priv(dev), &list); 450 br_dev_delete(dev, &list);
450 451
451 unregister_netdevice_many(&list); 452 unregister_netdevice_many(&list);
452 rtnl_unlock(); 453 rtnl_unlock();