Skip to content

Commit

Permalink
vlan: assign PDE->data before gluing PDE into /proc tree
Browse files Browse the repository at this point in the history
Simply replace proc_create and further data assigned with proc_create_data.

Signed-off-by: Denis V. Lunev <[email protected]>
Acked-by: Patrick McHardy <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Denis V. Lunev authored and davem330 committed May 2, 2008
1 parent 0c89652 commit 1d3faa3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions net/8021q/vlanproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,11 @@ int vlan_proc_add_dev(struct net_device *vlandev)
struct vlan_dev_info *dev_info = vlan_dev_info(vlandev);
struct vlan_net *vn = net_generic(dev_net(vlandev), vlan_net_id);

dev_info->dent = proc_create(vlandev->name, S_IFREG|S_IRUSR|S_IWUSR,
vn->proc_vlan_dir, &vlandev_fops);
dev_info->dent =
proc_create_data(vlandev->name, S_IFREG|S_IRUSR|S_IWUSR,
vn->proc_vlan_dir, &vlandev_fops, vlandev);
if (!dev_info->dent)
return -ENOBUFS;

dev_info->dent->data = vlandev;
return 0;
}

Expand Down

0 comments on commit 1d3faa3

Please sign in to comment.