Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264378
b: refs/heads/master
c: 1ce5cce
h: refs/heads/master
v: v3
  • Loading branch information
stephen hemminger authored and David S. Miller committed Oct 19, 2011
1 parent 7373fb4 commit 4936f4d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae2a4583154a5b985ed4a81c6259c55bafe6d810
refs/heads/master: 1ce5cce895309862d2c35d922816adebe094fe4a
9 changes: 5 additions & 4 deletions trunk/net/bridge/br_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,10 @@ static void del_nbp(struct net_bridge_port *p)
call_rcu(&p->rcu, destroy_nbp_rcu);
}

/* called with RTNL */
static void del_br(struct net_bridge *br, struct list_head *head)
/* Delete bridge device */
void br_dev_delete(struct net_device *dev, struct list_head *head)
{
struct net_bridge *br = netdev_priv(dev);
struct net_bridge_port *p, *n;

list_for_each_entry_safe(p, n, &br->port_list, list) {
Expand Down Expand Up @@ -268,7 +269,7 @@ int br_del_bridge(struct net *net, const char *name)
}

else
del_br(netdev_priv(dev), NULL);
br_dev_delete(dev, NULL);

rtnl_unlock();
return ret;
Expand Down Expand Up @@ -449,7 +450,7 @@ void __net_exit br_net_exit(struct net *net)
rtnl_lock();
for_each_netdev(net, dev)
if (dev->priv_flags & IFF_EBRIDGE)
del_br(netdev_priv(dev), &list);
br_dev_delete(dev, &list);

unregister_netdevice_many(&list);
rtnl_unlock();
Expand Down
1 change: 1 addition & 0 deletions trunk/net/bridge/br_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ static struct rtnl_link_ops br_link_ops __read_mostly = {
.priv_size = sizeof(struct net_bridge),
.setup = br_dev_setup,
.validate = br_validate,
.dellink = br_dev_delete,
};

int __init br_netlink_init(void)
Expand Down
1 change: 1 addition & 0 deletions trunk/net/bridge/br_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ static inline int br_is_root_bridge(const struct net_bridge *br)

/* br_device.c */
extern void br_dev_setup(struct net_device *dev);
extern void br_dev_delete(struct net_device *dev, struct list_head *list);
extern netdev_tx_t br_dev_xmit(struct sk_buff *skb,
struct net_device *dev);
#ifdef CONFIG_NET_POLL_CONTROLLER
Expand Down

0 comments on commit 4936f4d

Please sign in to comment.