diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-10-27 03:06:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-28 05:22:07 -0400 |
commit | 23289a37e2b127dfc4de1313fba15bb4c9f0cd5b (patch) | |
tree | 209edb2cb43dedb97477e1297873ada4759a1066 /net/8021q | |
parent | 9b5e383c11b08784eb0087617f880077982ef769 (diff) |
net: add a list_head parameter to dellink() method
Adding a list_head parameter to rtnl_link_ops->dellink() methods
allow us to queue devices on a list, in order to dismantle
them all at once.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q')
-rw-r--r-- | net/8021q/vlan.c | 8 | ||||
-rw-r--r-- | net/8021q/vlan.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 8836575f9d79..6b5c9dddaa72 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -140,7 +140,7 @@ static void vlan_rcu_free(struct rcu_head *rcu) | |||
140 | vlan_group_free(container_of(rcu, struct vlan_group, rcu)); | 140 | vlan_group_free(container_of(rcu, struct vlan_group, rcu)); |
141 | } | 141 | } |
142 | 142 | ||
143 | void unregister_vlan_dev(struct net_device *dev) | 143 | void unregister_vlan_dev(struct net_device *dev, struct list_head *head) |
144 | { | 144 | { |
145 | struct vlan_dev_info *vlan = vlan_dev_info(dev); | 145 | struct vlan_dev_info *vlan = vlan_dev_info(dev); |
146 | struct net_device *real_dev = vlan->real_dev; | 146 | struct net_device *real_dev = vlan->real_dev; |
@@ -164,7 +164,7 @@ void unregister_vlan_dev(struct net_device *dev) | |||
164 | 164 | ||
165 | synchronize_net(); | 165 | synchronize_net(); |
166 | 166 | ||
167 | unregister_netdevice(dev); | 167 | unregister_netdevice_queue(dev, head); |
168 | 168 | ||
169 | /* If the group is now empty, kill off the group. */ | 169 | /* If the group is now empty, kill off the group. */ |
170 | if (grp->nr_vlans == 0) { | 170 | if (grp->nr_vlans == 0) { |
@@ -535,7 +535,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event, | |||
535 | if (grp->nr_vlans == 1) | 535 | if (grp->nr_vlans == 1) |
536 | i = VLAN_GROUP_ARRAY_LEN; | 536 | i = VLAN_GROUP_ARRAY_LEN; |
537 | 537 | ||
538 | unregister_vlan_dev(vlandev); | 538 | unregister_vlan_dev(vlandev, NULL); |
539 | } | 539 | } |
540 | break; | 540 | break; |
541 | } | 541 | } |
@@ -642,7 +642,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg) | |||
642 | err = -EPERM; | 642 | err = -EPERM; |
643 | if (!capable(CAP_NET_ADMIN)) | 643 | if (!capable(CAP_NET_ADMIN)) |
644 | break; | 644 | break; |
645 | unregister_vlan_dev(dev); | 645 | unregister_vlan_dev(dev, NULL); |
646 | err = 0; | 646 | err = 0; |
647 | break; | 647 | break; |
648 | 648 | ||
diff --git a/net/8021q/vlan.h b/net/8021q/vlan.h index 4ade5edf1033..68f9290e6837 100644 --- a/net/8021q/vlan.h +++ b/net/8021q/vlan.h | |||
@@ -82,7 +82,7 @@ void vlan_dev_get_realdev_name(const struct net_device *dev, char *result); | |||
82 | int vlan_check_real_dev(struct net_device *real_dev, u16 vlan_id); | 82 | int vlan_check_real_dev(struct net_device *real_dev, u16 vlan_id); |
83 | void vlan_setup(struct net_device *dev); | 83 | void vlan_setup(struct net_device *dev); |
84 | int register_vlan_dev(struct net_device *dev); | 84 | int register_vlan_dev(struct net_device *dev); |
85 | void unregister_vlan_dev(struct net_device *dev); | 85 | void unregister_vlan_dev(struct net_device *dev, struct list_head *head); |
86 | 86 | ||
87 | static inline u32 vlan_get_ingress_priority(struct net_device *dev, | 87 | static inline u32 vlan_get_ingress_priority(struct net_device *dev, |
88 | u16 vlan_tci) | 88 | u16 vlan_tci) |