summaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2007-11-19 22:31:54 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 14:54:28 -0800
commite372c41401993b45c721c4d92730e7e0a79f7c1b (patch)
tree8f062f506c0578fc83b7d05c8751a7ccac96e50e /net/wireless
parent097e66c578459f79e3a2128c54e9df5194e1419a (diff)
downloadtalos-op-linux-e372c41401993b45c721c4d92730e7e0a79f7c1b.tar.gz
talos-op-linux-e372c41401993b45c721c4d92730e7e0a79f7c1b.zip
[NET]: Consolidate net namespace related proc files creation.
Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/wext.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/net/wireless/wext.c b/net/wireless/wext.c
index db03ed5ce055..1e4cf615f878 100644
--- a/net/wireless/wext.c
+++ b/net/wireless/wext.c
@@ -673,26 +673,8 @@ static const struct seq_operations wireless_seq_ops = {
static int wireless_seq_open(struct inode *inode, struct file *file)
{
- struct seq_file *seq;
- int res;
- res = seq_open(file, &wireless_seq_ops);
- if (!res) {
- seq = file->private_data;
- seq->private = get_proc_net(inode);
- if (!seq->private) {
- seq_release(inode, file);
- res = -ENXIO;
- }
- }
- return res;
-}
-
-static int wireless_seq_release(struct inode *inode, struct file *file)
-{
- struct seq_file *seq = file->private_data;
- struct net *net = seq->private;
- put_net(net);
- return seq_release(inode, file);
+ return seq_open_net(inode, file, &wireless_seq_ops,
+ sizeof(struct seq_net_private));
}
static const struct file_operations wireless_seq_fops = {
@@ -700,7 +682,7 @@ static const struct file_operations wireless_seq_fops = {
.open = wireless_seq_open,
.read = seq_read,
.llseek = seq_lseek,
- .release = wireless_seq_release,
+ .release = seq_release_net,
};
int wext_proc_init(struct net *net)
OpenPOWER on IntegriCloud