diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-25 13:36:06 -0400 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-25 15:39:56 -0400 |
commit | 1218854afa6f659be90b748cf1bc7badee954a35 (patch) | |
tree | 78b83e3941fa7e5a03c04e2e4f6ddb1a08ea38a0 /net/netlink | |
parent | 3b1e0a655f8eba44ab1ee2a1068d169ccfb853b9 (diff) |
[NET] NETNS: Omit seq_net_private->net without CONFIG_NET_NS.
Without CONFIG_NET_NS, no namespace other than &init_net exists,
no need to store net in seq_net_private.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/netlink')
-rw-r--r-- | net/netlink/af_netlink.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 712a7bff8560..1d16d95dfaaf 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -1758,7 +1758,7 @@ static struct sock *netlink_seq_socket_idx(struct seq_file *seq, loff_t pos) | |||
1758 | 1758 | ||
1759 | for (j = 0; j <= hash->mask; j++) { | 1759 | for (j = 0; j <= hash->mask; j++) { |
1760 | sk_for_each(s, node, &hash->table[j]) { | 1760 | sk_for_each(s, node, &hash->table[j]) { |
1761 | if (sock_net(s) != iter->p.net) | 1761 | if (sock_net(s) != seq_file_net(seq)) |
1762 | continue; | 1762 | continue; |
1763 | if (off == pos) { | 1763 | if (off == pos) { |
1764 | iter->link = i; | 1764 | iter->link = i; |
@@ -1794,7 +1794,7 @@ static void *netlink_seq_next(struct seq_file *seq, void *v, loff_t *pos) | |||
1794 | s = v; | 1794 | s = v; |
1795 | do { | 1795 | do { |
1796 | s = sk_next(s); | 1796 | s = sk_next(s); |
1797 | } while (s && (sock_net(s) != iter->p.net)); | 1797 | } while (s && sock_net(s) != seq_file_net(seq)); |
1798 | if (s) | 1798 | if (s) |
1799 | return s; | 1799 | return s; |
1800 | 1800 | ||
@@ -1806,7 +1806,7 @@ static void *netlink_seq_next(struct seq_file *seq, void *v, loff_t *pos) | |||
1806 | 1806 | ||
1807 | for (; j <= hash->mask; j++) { | 1807 | for (; j <= hash->mask; j++) { |
1808 | s = sk_head(&hash->table[j]); | 1808 | s = sk_head(&hash->table[j]); |
1809 | while (s && sock_net(s) != iter->p.net) | 1809 | while (s && sock_net(s) != seq_file_net(seq)) |
1810 | s = sk_next(s); | 1810 | s = sk_next(s); |
1811 | if (s) { | 1811 | if (s) { |
1812 | iter->link = i; | 1812 | iter->link = i; |