aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/x_tables.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-26 02:36:06 +0900
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-26 04:39:56 +0900
commit1218854afa6f659be90b748cf1bc7badee954a35 (patch)
tree78b83e3941fa7e5a03c04e2e4f6ddb1a08ea38a0 /net/netfilter/x_tables.c
parent3b1e0a655f8eba44ab1ee2a1068d169ccfb853b9 (diff)
downloadlinux-1218854afa6f659be90b748cf1bc7badee954a35.tar.gz
[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/netfilter/x_tables.c')
-rw-r--r--net/netfilter/x_tables.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index a6792089fcf9d..0bd95680a494e 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -727,7 +727,7 @@ struct xt_names_priv {
static void *xt_table_seq_start(struct seq_file *seq, loff_t *pos)
{
struct xt_names_priv *priv = seq->private;
- struct net *net = priv->p.net;
+ struct net *net = seq_file_net(seq);
int af = priv->af;
mutex_lock(&xt[af].mutex);
@@ -737,7 +737,7 @@ static void *xt_table_seq_start(struct seq_file *seq, loff_t *pos)
static void *xt_table_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
struct xt_names_priv *priv = seq->private;
- struct net *net = priv->p.net;
+ struct net *net = seq_file_net(seq);
int af = priv->af;
return seq_list_next(v, &net->xt.tables[af], pos);