aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/raw.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-04-10 22:08:28 +0200
committerChristoph Hellwig <hch@lst.de>2018-05-16 07:23:35 +0200
commit93cb5a1f5851ab1a0b4be735c40130898a64b812 (patch)
tree47d4f61cf3a519db2bb2cf8748ee661db90f23c7 /net/ipv6/raw.c
parentipv{4,6}/ping: simplify proc file creation (diff)
downloadlinux-dev-93cb5a1f5851ab1a0b4be735c40130898a64b812.tar.xz
linux-dev-93cb5a1f5851ab1a0b4be735c40130898a64b812.zip
ipv{4,6}/raw: simplify ѕeq_file code
Pass the hashtable to the proc private data instead of copying it into the per-file private data. Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to '')
-rw-r--r--net/ipv6/raw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 5eb9b08947ed..dade69bf61e6 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -1306,7 +1306,8 @@ static const struct seq_operations raw6_seq_ops = {
static int raw6_seq_open(struct inode *inode, struct file *file)
{
- return raw_seq_open(inode, file, &raw_v6_hashinfo, &raw6_seq_ops);
+ return seq_open_net(inode, file, &raw6_seq_ops,
+ sizeof(struct raw_iter_state));
}
static const struct file_operations raw6_seq_fops = {
@@ -1318,7 +1319,8 @@ static const struct file_operations raw6_seq_fops = {
static int __net_init raw6_init_net(struct net *net)
{
- if (!proc_create("raw6", 0444, net->proc_net, &raw6_seq_fops))
+ if (!proc_create_data("raw6", 0444, net->proc_net, &raw6_seq_fops,
+ &raw_v6_hashinfo))
return -ENOMEM;
return 0;