Commit 42508461 authored by Denis V. Lunev's avatar Denis V. Lunev Committed by David S. Miller

[NEIGH]: Make /proc/net/arp opening consistent with seq_net_open semantics

seq_open_net requires that first field of the seq->private data to be
struct seq_net_private. In reality this is a single pointer to a
struct net for now. The patch makes code consistent.
Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ae22120a
...@@ -223,7 +223,7 @@ extern void __neigh_for_each_release(struct neigh_table *tbl, int (*cb)(struct n ...@@ -223,7 +223,7 @@ extern void __neigh_for_each_release(struct neigh_table *tbl, int (*cb)(struct n
extern void pneigh_for_each(struct neigh_table *tbl, void (*cb)(struct pneigh_entry *)); extern void pneigh_for_each(struct neigh_table *tbl, void (*cb)(struct pneigh_entry *));
struct neigh_seq_state { struct neigh_seq_state {
struct net *net; struct seq_net_private p;
struct neigh_table *tbl; struct neigh_table *tbl;
void *(*neigh_sub_iter)(struct neigh_seq_state *state, void *(*neigh_sub_iter)(struct neigh_seq_state *state,
struct neighbour *n, loff_t *pos); struct neighbour *n, loff_t *pos);
......
...@@ -2142,7 +2142,7 @@ EXPORT_SYMBOL(__neigh_for_each_release); ...@@ -2142,7 +2142,7 @@ EXPORT_SYMBOL(__neigh_for_each_release);
static struct neighbour *neigh_get_first(struct seq_file *seq) static struct neighbour *neigh_get_first(struct seq_file *seq)
{ {
struct neigh_seq_state *state = seq->private; struct neigh_seq_state *state = seq->private;
struct net *net = state->net; struct net *net = state->p.net;
struct neigh_table *tbl = state->tbl; struct neigh_table *tbl = state->tbl;
struct neighbour *n = NULL; struct neighbour *n = NULL;
int bucket = state->bucket; int bucket = state->bucket;
...@@ -2183,7 +2183,7 @@ static struct neighbour *neigh_get_next(struct seq_file *seq, ...@@ -2183,7 +2183,7 @@ static struct neighbour *neigh_get_next(struct seq_file *seq,
loff_t *pos) loff_t *pos)
{ {
struct neigh_seq_state *state = seq->private; struct neigh_seq_state *state = seq->private;
struct net *net = state->net; struct net *net = state->p.net;
struct neigh_table *tbl = state->tbl; struct neigh_table *tbl = state->tbl;
if (state->neigh_sub_iter) { if (state->neigh_sub_iter) {
...@@ -2243,7 +2243,7 @@ static struct neighbour *neigh_get_idx(struct seq_file *seq, loff_t *pos) ...@@ -2243,7 +2243,7 @@ static struct neighbour *neigh_get_idx(struct seq_file *seq, loff_t *pos)
static struct pneigh_entry *pneigh_get_first(struct seq_file *seq) static struct pneigh_entry *pneigh_get_first(struct seq_file *seq)
{ {
struct neigh_seq_state *state = seq->private; struct neigh_seq_state *state = seq->private;
struct net * net = state->net; struct net * net = state->p.net;
struct neigh_table *tbl = state->tbl; struct neigh_table *tbl = state->tbl;
struct pneigh_entry *pn = NULL; struct pneigh_entry *pn = NULL;
int bucket = state->bucket; int bucket = state->bucket;
...@@ -2266,7 +2266,7 @@ static struct pneigh_entry *pneigh_get_next(struct seq_file *seq, ...@@ -2266,7 +2266,7 @@ static struct pneigh_entry *pneigh_get_next(struct seq_file *seq,
loff_t *pos) loff_t *pos)
{ {
struct neigh_seq_state *state = seq->private; struct neigh_seq_state *state = seq->private;
struct net * net = state->net; struct net * net = state->p.net;
struct neigh_table *tbl = state->tbl; struct neigh_table *tbl = state->tbl;
pn = pn->next; pn = pn->next;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment