aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_hash.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-25 13:36:06 -0400
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-25 15:39:56 -0400
commit1218854afa6f659be90b748cf1bc7badee954a35 (patch)
tree78b83e3941fa7e5a03c04e2e4f6ddb1a08ea38a0 /net/ipv4/fib_hash.c
parent3b1e0a655f8eba44ab1ee2a1068d169ccfb853b9 (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/ipv4/fib_hash.c')
-rw-r--r--net/ipv4/fib_hash.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
index 8d58d85dfac6..02088deb0461 100644
--- a/net/ipv4/fib_hash.c
+++ b/net/ipv4/fib_hash.c
@@ -821,7 +821,7 @@ static struct fib_alias *fib_get_first(struct seq_file *seq)
821 struct fib_table *main_table; 821 struct fib_table *main_table;
822 struct fn_hash *table; 822 struct fn_hash *table;
823 823
824 main_table = fib_get_table(iter->p.net, RT_TABLE_MAIN); 824 main_table = fib_get_table(seq_file_net(seq), RT_TABLE_MAIN);
825 table = (struct fn_hash *)main_table->tb_data; 825 table = (struct fn_hash *)main_table->tb_data;
826 826
827 iter->bucket = 0; 827 iter->bucket = 0;
@@ -959,11 +959,10 @@ static struct fib_alias *fib_get_idx(struct seq_file *seq, loff_t pos)
959static void *fib_seq_start(struct seq_file *seq, loff_t *pos) 959static void *fib_seq_start(struct seq_file *seq, loff_t *pos)
960 __acquires(fib_hash_lock) 960 __acquires(fib_hash_lock)
961{ 961{
962 struct fib_iter_state *iter = seq->private;
963 void *v = NULL; 962 void *v = NULL;
964 963
965 read_lock(&fib_hash_lock); 964 read_lock(&fib_hash_lock);
966 if (fib_get_table(iter->p.net, RT_TABLE_MAIN)) 965 if (fib_get_table(seq_file_net(seq), RT_TABLE_MAIN))
967 v = *pos ? fib_get_idx(seq, *pos - 1) : SEQ_START_TOKEN; 966 v = *pos ? fib_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
968 return v; 967 return v;
969} 968}