From c3506372277779fccbffee2475400fcd689d5738 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 10 Apr 2018 19:42:55 +0200 Subject: proc: introduce proc_create_net{,_data} Variants of proc_create{,_data} that directly take a struct seq_operations and deal with network namespaces in ->open and ->release. All callers of proc_create + seq_open_net converted over, and seq_{open,release}_net are removed entirely. Signed-off-by: Christoph Hellwig --- net/8021q/vlanproc.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'net/8021q/vlanproc.c') diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index d3e3f0f2ec1c..d36e8c4b7f56 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c @@ -73,19 +73,6 @@ static const struct seq_operations vlan_seq_ops = { .show = vlan_seq_show, }; -static int vlan_seq_open(struct inode *inode, struct file *file) -{ - return seq_open_net(inode, file, &vlan_seq_ops, - sizeof(struct seq_net_private)); -} - -static const struct file_operations vlan_fops = { - .open = vlan_seq_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release_net, -}; - /* * Proc filesystem directory entries. */ @@ -132,8 +119,9 @@ int __net_init vlan_proc_init(struct net *net) if (!vn->proc_vlan_dir) goto err; - vn->proc_vlan_conf = proc_create(name_conf, S_IFREG | 0600, - vn->proc_vlan_dir, &vlan_fops); + vn->proc_vlan_conf = proc_create_net(name_conf, S_IFREG | 0600, + vn->proc_vlan_dir, &vlan_seq_ops, + sizeof(struct seq_net_private)); if (!vn->proc_vlan_conf) goto err; return 0; -- cgit v1.2.3