diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-25 19:43:59 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-25 19:43:59 -0700 |
commit | dfe98e9214ced45cd1a6ecd19f2627819a630f77 (patch) | |
tree | 4a229937bc32c470ebb75a51bdd39572d91ac0ce /net/ipv4/fib_trie.c | |
parent | f89e6e3834035c6e8203042f3527931aa7f52496 (diff) | |
parent | 878628fbf2589eb24357e42027d5f54b1dafd3c8 (diff) |
Merge branch 'net-2.6.26-netns-20080326' of git://git.linux-ipv6.org/gitroot/yoshfuji/linux-2.6-dev
Diffstat (limited to 'net/ipv4/fib_trie.c')
-rw-r--r-- | net/ipv4/fib_trie.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index ce6cb34e28e..9e491e70e85 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c @@ -2279,9 +2279,10 @@ static const struct file_operations fib_triestat_fops = { .release = fib_triestat_seq_release, }; -static struct node *fib_trie_get_idx(struct fib_trie_iter *iter, loff_t pos) +static struct node *fib_trie_get_idx(struct seq_file *seq, loff_t pos) { - struct net *net = iter->p.net; + struct fib_trie_iter *iter = seq->private; + struct net *net = seq_file_net(seq); loff_t idx = 0; unsigned int h; @@ -2309,16 +2310,14 @@ static struct node *fib_trie_get_idx(struct fib_trie_iter *iter, loff_t pos) static void *fib_trie_seq_start(struct seq_file *seq, loff_t *pos) __acquires(RCU) { - struct fib_trie_iter *iter = seq->private; - rcu_read_lock(); - return fib_trie_get_idx(iter, *pos); + return fib_trie_get_idx(seq, *pos); } static void *fib_trie_seq_next(struct seq_file *seq, void *v, loff_t *pos) { struct fib_trie_iter *iter = seq->private; - struct net *net = iter->p.net; + struct net *net = seq_file_net(seq); struct fib_table *tb = iter->tb; struct hlist_node *tb_node; unsigned int h; @@ -2513,7 +2512,7 @@ static void *fib_route_seq_start(struct seq_file *seq, loff_t *pos) struct fib_table *tb; rcu_read_lock(); - tb = fib_get_table(iter->p.net, RT_TABLE_MAIN); + tb = fib_get_table(seq_file_net(seq), RT_TABLE_MAIN); if (!tb) return NULL; |