Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90651
b: refs/heads/master
c: 9427c4b
h: refs/heads/master
i:
  90649: ab08383
  90647: a9ee8a9
v: v3
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed Apr 14, 2008
1 parent 8c4a544 commit f71fc5c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 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: 1abf4fb20d38cf58c92b27f4d6ad4fa92a3bb553
refs/heads/master: 9427c4b36b8fe652df1d7c89eae678948e1f4b32
3 changes: 1 addition & 2 deletions trunk/include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1328,8 +1328,8 @@ struct tcp_seq_afinfo {
struct module *owner;
char *name;
sa_family_t family;
int (*seq_show) (struct seq_file *m, void *v);
struct file_operations *seq_fops;
struct seq_operations seq_ops;
};

struct tcp_iter_state {
Expand All @@ -1338,7 +1338,6 @@ struct tcp_iter_state {
enum tcp_seq_states state;
struct sock *syn_wait_sk;
int bucket, sbucket, num, uid;
struct seq_operations seq_ops;
};

extern int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo);
Expand Down
14 changes: 8 additions & 6 deletions trunk/net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -2229,13 +2229,9 @@ static int tcp_seq_open(struct inode *inode, struct file *file)
goto out_kfree;

s->family = afinfo->family;
s->seq_ops.start = tcp_seq_start;
s->seq_ops.next = tcp_seq_next;
s->seq_ops.show = afinfo->seq_show;
s->seq_ops.stop = tcp_seq_stop;
s->p.net = net;

rc = seq_open(file, &s->seq_ops);
rc = seq_open(file, &afinfo->seq_ops);
if (rc)
goto out_put_net;
seq = file->private_data;
Expand Down Expand Up @@ -2269,6 +2265,10 @@ int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo)
afinfo->seq_fops->llseek = seq_lseek;
afinfo->seq_fops->release = tcp_seq_release;

afinfo->seq_ops.start = tcp_seq_start;
afinfo->seq_ops.next = tcp_seq_next;
afinfo->seq_ops.stop = tcp_seq_stop;

p = proc_net_fops_create(net, afinfo->name, S_IRUGO, afinfo->seq_fops);
if (p)
p->data = afinfo;
Expand Down Expand Up @@ -2414,8 +2414,10 @@ static struct tcp_seq_afinfo tcp4_seq_afinfo = {
.owner = THIS_MODULE,
.name = "tcp",
.family = AF_INET,
.seq_show = tcp4_seq_show,
.seq_fops = &tcp4_seq_fops,
.seq_ops = {
.show = tcp4_seq_show,
},
};

static int tcp4_proc_init_net(struct net *net)
Expand Down
4 changes: 3 additions & 1 deletion trunk/net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -2125,8 +2125,10 @@ static struct tcp_seq_afinfo tcp6_seq_afinfo = {
.owner = THIS_MODULE,
.name = "tcp6",
.family = AF_INET6,
.seq_show = tcp6_seq_show,
.seq_fops = &tcp6_seq_fops,
.seq_ops = {
.show = tcp6_seq_show,
},
};

int tcp6_proc_init(struct net *net)
Expand Down

0 comments on commit f71fc5c

Please sign in to comment.