Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90751
b: refs/heads/master
c: 80de2d9
h: refs/heads/master
i:
  90749: 7c08896
  90747: 5816ae3
  90743: 7051f58
  90735: 81fe3c5
  90719: 913cc5e
  90687: a56d56a
  90623: f004633
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Apr 16, 2008
1 parent 614d597 commit c54b5a1
Show file tree
Hide file tree
Showing 2 changed files with 9 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: a59a8c1c865e6d231e1b5675f767ace006f08c21
refs/heads/master: 80de2d982156b5f6f50ff97175dc94ccfe3d093f
13 changes: 8 additions & 5 deletions trunk/net/8021q/vlanproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,16 @@ static const struct seq_operations vlan_seq_ops = {

static int vlan_seq_open(struct inode *inode, struct file *file)
{
return seq_open(file, &vlan_seq_ops);
return seq_open_net(inode, file, &vlan_seq_ops,
sizeof(struct seq_net_private));
}

static const struct file_operations vlan_fops = {
.owner = THIS_MODULE,
.open = vlan_seq_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
.release = seq_release_net,
};

/*
Expand Down Expand Up @@ -211,14 +212,15 @@ static void *vlan_seq_start(struct seq_file *seq, loff_t *pos)
__acquires(dev_base_lock)
{
struct net_device *dev;
struct net *net = seq_file_net(seq);
loff_t i = 1;

read_lock(&dev_base_lock);

if (*pos == 0)
return SEQ_START_TOKEN;

for_each_netdev(&init_net, dev) {
for_each_netdev(net, dev) {
if (!is_vlan_dev(dev))
continue;

Expand All @@ -232,14 +234,15 @@ static void *vlan_seq_start(struct seq_file *seq, loff_t *pos)
static void *vlan_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
struct net_device *dev;
struct net *net = seq_file_net(seq);

++*pos;

dev = (struct net_device *)v;
if (v == SEQ_START_TOKEN)
dev = net_device_entry(&init_net.dev_base_head);
dev = net_device_entry(&net->dev_base_head);

for_each_netdev_continue(&init_net, dev) {
for_each_netdev_continue(net, dev) {
if (!is_vlan_dev(dev))
continue;

Expand Down

0 comments on commit c54b5a1

Please sign in to comment.