diff options
Diffstat (limited to 'net/ipv6/proc.c')
-rw-r--r-- | net/ipv6/proc.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index cbc7e514d3ec..29c5a79444c2 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c | |||
@@ -183,24 +183,7 @@ static int snmp6_seq_show(struct seq_file *seq, void *v) | |||
183 | 183 | ||
184 | static int sockstat6_seq_open(struct inode *inode, struct file *file) | 184 | static int sockstat6_seq_open(struct inode *inode, struct file *file) |
185 | { | 185 | { |
186 | int err; | 186 | return single_open_net(inode, file, sockstat6_seq_show); |
187 | struct net *net; | ||
188 | |||
189 | err = -ENXIO; | ||
190 | net = get_proc_net(inode); | ||
191 | if (net == NULL) | ||
192 | goto err_net; | ||
193 | |||
194 | err = single_open(file, sockstat6_seq_show, net); | ||
195 | if (err < 0) | ||
196 | goto err_open; | ||
197 | |||
198 | return 0; | ||
199 | |||
200 | err_open: | ||
201 | put_net(net); | ||
202 | err_net: | ||
203 | return err; | ||
204 | } | 187 | } |
205 | 188 | ||
206 | static int sockstat6_seq_release(struct inode *inode, struct file *file) | 189 | static int sockstat6_seq_release(struct inode *inode, struct file *file) |