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/core | |
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/core')
-rw-r--r-- | net/core/neighbour.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 065fbac7ecd3..b8d491fb4b42 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -2145,7 +2145,7 @@ EXPORT_SYMBOL(__neigh_for_each_release); | |||
2145 | static struct neighbour *neigh_get_first(struct seq_file *seq) | 2145 | static struct neighbour *neigh_get_first(struct seq_file *seq) |
2146 | { | 2146 | { |
2147 | struct neigh_seq_state *state = seq->private; | 2147 | struct neigh_seq_state *state = seq->private; |
2148 | struct net *net = state->p.net; | 2148 | struct net *net = seq_file_net(seq); |
2149 | struct neigh_table *tbl = state->tbl; | 2149 | struct neigh_table *tbl = state->tbl; |
2150 | struct neighbour *n = NULL; | 2150 | struct neighbour *n = NULL; |
2151 | int bucket = state->bucket; | 2151 | int bucket = state->bucket; |
@@ -2186,7 +2186,7 @@ static struct neighbour *neigh_get_next(struct seq_file *seq, | |||
2186 | loff_t *pos) | 2186 | loff_t *pos) |
2187 | { | 2187 | { |
2188 | struct neigh_seq_state *state = seq->private; | 2188 | struct neigh_seq_state *state = seq->private; |
2189 | struct net *net = state->p.net; | 2189 | struct net *net = seq_file_net(seq); |
2190 | struct neigh_table *tbl = state->tbl; | 2190 | struct neigh_table *tbl = state->tbl; |
2191 | 2191 | ||
2192 | if (state->neigh_sub_iter) { | 2192 | if (state->neigh_sub_iter) { |
@@ -2246,7 +2246,7 @@ static struct neighbour *neigh_get_idx(struct seq_file *seq, loff_t *pos) | |||
2246 | static struct pneigh_entry *pneigh_get_first(struct seq_file *seq) | 2246 | static struct pneigh_entry *pneigh_get_first(struct seq_file *seq) |
2247 | { | 2247 | { |
2248 | struct neigh_seq_state *state = seq->private; | 2248 | struct neigh_seq_state *state = seq->private; |
2249 | struct net * net = state->p.net; | 2249 | struct net *net = seq_file_net(seq); |
2250 | struct neigh_table *tbl = state->tbl; | 2250 | struct neigh_table *tbl = state->tbl; |
2251 | struct pneigh_entry *pn = NULL; | 2251 | struct pneigh_entry *pn = NULL; |
2252 | int bucket = state->bucket; | 2252 | int bucket = state->bucket; |
@@ -2269,7 +2269,7 @@ static struct pneigh_entry *pneigh_get_next(struct seq_file *seq, | |||
2269 | loff_t *pos) | 2269 | loff_t *pos) |
2270 | { | 2270 | { |
2271 | struct neigh_seq_state *state = seq->private; | 2271 | struct neigh_seq_state *state = seq->private; |
2272 | struct net * net = state->p.net; | 2272 | struct net *net = seq_file_net(seq); |
2273 | struct neigh_table *tbl = state->tbl; | 2273 | struct neigh_table *tbl = state->tbl; |
2274 | 2274 | ||
2275 | pn = pn->next; | 2275 | pn = pn->next; |