Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278789
b: refs/heads/master
c: f9586f7
h: refs/heads/master
i:
  278787: d0f2142
v: v3
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Dec 14, 2011
1 parent 75a1b49 commit a1a0d64
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 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: c63044f0d22a13532047ad04216af45b6ac7fdaf
refs/heads/master: f9586f79bf6125ae28fab9f585094c56e8740e83
14 changes: 9 additions & 5 deletions trunk/net/8021q/vlan_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,16 @@ int vlan_vids_add_by_dev(struct net_device *dev,
const struct net_device *by_dev)
{
struct vlan_vid_info *vid_info;
struct vlan_info *vlan_info;
int err;

ASSERT_RTNL();

if (!by_dev->vlan_info)
vlan_info = rtnl_dereference(by_dev->vlan_info);
if (!vlan_info)
return 0;

list_for_each_entry(vid_info, &by_dev->vlan_info->vid_list, list) {
list_for_each_entry(vid_info, &vlan_info->vid_list, list) {
err = vlan_vid_add(dev, vid_info->vid);
if (err)
goto unwind;
Expand All @@ -342,7 +344,7 @@ int vlan_vids_add_by_dev(struct net_device *dev,

unwind:
list_for_each_entry_continue_reverse(vid_info,
&by_dev->vlan_info->vid_list,
&vlan_info->vid_list,
list) {
vlan_vid_del(dev, vid_info->vid);
}
Expand All @@ -355,13 +357,15 @@ void vlan_vids_del_by_dev(struct net_device *dev,
const struct net_device *by_dev)
{
struct vlan_vid_info *vid_info;
struct vlan_info *vlan_info;

ASSERT_RTNL();

if (!by_dev->vlan_info)
vlan_info = rtnl_dereference(by_dev->vlan_info);
if (!vlan_info)
return;

list_for_each_entry(vid_info, &by_dev->vlan_info->vid_list, list)
list_for_each_entry(vid_info, &vlan_info->vid_list, list)
vlan_vid_del(dev, vid_info->vid);
}
EXPORT_SYMBOL(vlan_vids_del_by_dev);

0 comments on commit a1a0d64

Please sign in to comment.