diff options
author | Christoph Hellwig <hch@lst.de> | 2018-04-10 19:42:55 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-05-16 07:24:30 +0200 |
commit | c3506372277779fccbffee2475400fcd689d5738 (patch) | |
tree | d45d820f96a84a1223fa84c6ad4b7d84a81399aa /net/atm | |
parent | a2dcdee3748b664bf011b4b12de64e945dd4c8c2 (diff) | |
download | linux-stable-c3506372277779fccbffee2475400fcd689d5738.tar.gz linux-stable-c3506372277779fccbffee2475400fcd689d5738.tar.bz2 linux-stable-c3506372277779fccbffee2475400fcd689d5738.zip |
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 <hch@lst.de>
Diffstat (limited to 'net/atm')
-rw-r--r-- | net/atm/clip.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/net/atm/clip.c b/net/atm/clip.c index f07dbc632222..66caa48a27c2 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c @@ -863,20 +863,6 @@ static const struct seq_operations arp_seq_ops = { .stop = neigh_seq_stop, .show = clip_seq_show, }; - -static int arp_seq_open(struct inode *inode, struct file *file) -{ - return seq_open_net(inode, file, &arp_seq_ops, - sizeof(struct clip_seq_state)); -} - -static const struct file_operations arp_seq_fops = { - .open = arp_seq_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release_net, - .owner = THIS_MODULE -}; #endif static void atm_clip_exit_noproc(void); @@ -893,7 +879,8 @@ static int __init atm_clip_init(void) { struct proc_dir_entry *p; - p = proc_create("arp", 0444, atm_proc_root, &arp_seq_fops); + p = proc_create_net("arp", 0444, atm_proc_root, &arp_seq_ops, + sizeof(struct clip_seq_state)); if (!p) { pr_err("Unable to initialize /proc/net/atm/arp\n"); atm_clip_exit_noproc(); |