diff options
Diffstat (limited to 'net/ipv4/fib_hash.c')
-rw-r--r-- | net/ipv4/fib_hash.c | 5 |
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) | |||
959 | static void *fib_seq_start(struct seq_file *seq, loff_t *pos) | 959 | static 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 | } |