Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90649
b: refs/heads/master
c: a4146b1
h: refs/heads/master
i:
  90647: a9ee8a9
v: v3
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed Apr 14, 2008
1 parent 215c8a7 commit ab08383
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 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: 2cf83afe902fd72ef4b211774e48ab39890fb328
refs/heads/master: a4146b1b2c6ba995db08b1a2aef5af1b17b151e6
2 changes: 1 addition & 1 deletion trunk/include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ struct tcp_seq_afinfo {
};

struct tcp_iter_state {
struct net *net;
struct seq_net_private p;
sa_family_t family;
enum tcp_seq_states state;
struct sock *syn_wait_sk;
Expand Down
11 changes: 5 additions & 6 deletions trunk/net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1954,7 +1954,7 @@ static void *listening_get_next(struct seq_file *seq, void *cur)
struct hlist_node *node;
struct sock *sk = cur;
struct tcp_iter_state* st = seq->private;
struct net *net = st->net;
struct net *net = seq_file_net(seq);

if (!sk) {
st->bucket = 0;
Expand Down Expand Up @@ -2035,7 +2035,7 @@ static void *listening_get_idx(struct seq_file *seq, loff_t *pos)
static void *established_get_first(struct seq_file *seq)
{
struct tcp_iter_state* st = seq->private;
struct net *net = st->net;
struct net *net = seq_file_net(seq);
void *rc = NULL;

for (st->bucket = 0; st->bucket < tcp_hashinfo.ehash_size; ++st->bucket) {
Expand Down Expand Up @@ -2076,7 +2076,7 @@ static void *established_get_next(struct seq_file *seq, void *cur)
struct inet_timewait_sock *tw;
struct hlist_node *node;
struct tcp_iter_state* st = seq->private;
struct net *net = st->net;
struct net *net = seq_file_net(seq);

++st->num;

Expand Down Expand Up @@ -2233,7 +2233,7 @@ static int tcp_seq_open(struct inode *inode, struct file *file)
s->seq_ops.next = tcp_seq_next;
s->seq_ops.show = afinfo->seq_show;
s->seq_ops.stop = tcp_seq_stop;
s->net = net;
s->p.net = net;

rc = seq_open(file, &s->seq_ops);
if (rc)
Expand All @@ -2252,9 +2252,8 @@ static int tcp_seq_open(struct inode *inode, struct file *file)
static int tcp_seq_release(struct inode *inode, struct file *file)
{
struct seq_file *seq = file->private_data;
struct tcp_iter_state *s = seq->private;

put_net(s->net);
put_net(seq_file_net(seq));
seq_release_private(inode, file);
return 0;
}
Expand Down

0 comments on commit ab08383

Please sign in to comment.