aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/proc_net.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 /fs/proc/proc_net.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 'fs/proc/proc_net.c')
-rw-r--r--fs/proc/proc_net.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c
index 4caa5f774fb7..13cd7835d0df 100644
--- a/fs/proc/proc_net.c
+++ b/fs/proc/proc_net.c
@@ -44,7 +44,9 @@ int seq_open_net(struct inode *ino, struct file *f,
44 put_net(net); 44 put_net(net);
45 return -ENOMEM; 45 return -ENOMEM;
46 } 46 }
47#ifdef CONFIG_NET_NS
47 p->net = net; 48 p->net = net;
49#endif
48 return 0; 50 return 0;
49} 51}
50EXPORT_SYMBOL_GPL(seq_open_net); 52EXPORT_SYMBOL_GPL(seq_open_net);
@@ -52,12 +54,10 @@ EXPORT_SYMBOL_GPL(seq_open_net);
52int seq_release_net(struct inode *ino, struct file *f) 54int seq_release_net(struct inode *ino, struct file *f)
53{ 55{
54 struct seq_file *seq; 56 struct seq_file *seq;
55 struct seq_net_private *p;
56 57
57 seq = f->private_data; 58 seq = f->private_data;
58 p = seq->private;
59 59
60 put_net(p->net); 60 put_net(seq_file_net(seq));
61 seq_release_private(ino, f); 61 seq_release_private(ino, f);
62 return 0; 62 return 0;
63} 63}