aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 978d9db1df3..c50dd179364 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -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;
@@ -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;
@@ -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)