aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-03-28 21:23:33 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-28 21:23:33 -0400
commit6f191efe48af62dd5f8917dd21d187f896cd6c81 (patch)
tree5714f28be720f2e52f256ae516e76bc4ba4fc7de /net/ipv4/udp.c
parenta0f55e0e833009c6a4eeb2626b807e3c21b128c8 (diff)
[UDP]: Replace struct net on udp_iter_state with seq_net_private.
Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 0255f373b3e5..d695097be2dc 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1503,7 +1503,7 @@ static struct sock *udp_get_first(struct seq_file *seq)
1503{ 1503{
1504 struct sock *sk; 1504 struct sock *sk;
1505 struct udp_iter_state *state = seq->private; 1505 struct udp_iter_state *state = seq->private;
1506 struct net *net = state->net; 1506 struct net *net = seq_file_net(seq);
1507 1507
1508 for (state->bucket = 0; state->bucket < UDP_HTABLE_SIZE; ++state->bucket) { 1508 for (state->bucket = 0; state->bucket < UDP_HTABLE_SIZE; ++state->bucket) {
1509 struct hlist_node *node; 1509 struct hlist_node *node;
@@ -1522,7 +1522,7 @@ found:
1522static struct sock *udp_get_next(struct seq_file *seq, struct sock *sk) 1522static struct sock *udp_get_next(struct seq_file *seq, struct sock *sk)
1523{ 1523{
1524 struct udp_iter_state *state = seq->private; 1524 struct udp_iter_state *state = seq->private;
1525 struct net *net = state->net; 1525 struct net *net = seq_file_net(seq);
1526 1526
1527 do { 1527 do {
1528 sk = sk_next(sk); 1528 sk = sk_next(sk);
@@ -1595,7 +1595,7 @@ static int udp_seq_open(struct inode *inode, struct file *file)
1595 s->seq_ops.next = udp_seq_next; 1595 s->seq_ops.next = udp_seq_next;
1596 s->seq_ops.show = afinfo->seq_show; 1596 s->seq_ops.show = afinfo->seq_show;
1597 s->seq_ops.stop = udp_seq_stop; 1597 s->seq_ops.stop = udp_seq_stop;
1598 s->net = net; 1598 s->p.net = net;
1599 1599
1600 rc = seq_open(file, &s->seq_ops); 1600 rc = seq_open(file, &s->seq_ops);
1601 if (rc) 1601 if (rc)
@@ -1617,7 +1617,7 @@ static int udp_seq_release(struct inode *inode, struct file *file)
1617 struct seq_file *seq = file->private_data; 1617 struct seq_file *seq = file->private_data;
1618 struct udp_iter_state *s = seq->private; 1618 struct udp_iter_state *s = seq->private;
1619 1619
1620 put_net(s->net); 1620 put_net(s->p.net);
1621 seq_release_private(inode, file); 1621 seq_release_private(inode, file);
1622 return 0; 1622 return 0;
1623} 1623}