Skip to content

Commit 8086cd4

Browse files
AdrianBunkdavem330
authored andcommitted
netns: make get_proc_net() static
get_proc_net() can now become static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent cf508b1 commit 8086cd4

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

‎fs/proc/proc_net.c‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
#include "internal.h"
2828

2929

30+
static struct net *get_proc_net(const struct inode *inode)
31+
{
32+
return maybe_get_net(PDE_NET(PDE(inode)));
33+
}
34+
3035
int seq_open_net(struct inode *ino, struct file *f,
3136
const struct seq_operations *ops, int size)
3237
{
@@ -185,12 +190,6 @@ void proc_net_remove(struct net *net, const char *name)
185190
}
186191
EXPORT_SYMBOL_GPL(proc_net_remove);
187192

188-
struct net *get_proc_net(const struct inode *inode)
189-
{
190-
return maybe_get_net(PDE_NET(PDE(inode)));
191-
}
192-
EXPORT_SYMBOL_GPL(get_proc_net);
193-
194193
static __net_init int proc_net_ns_init(struct net *net)
195194
{
196195
struct proc_dir_entry *netd, *net_statd;

‎include/linux/proc_fs.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,6 @@ static inline struct net *PDE_NET(struct proc_dir_entry *pde)
305305
return pde->parent->data;
306306
}
307307

308-
struct net *get_proc_net(const struct inode *inode);
309-
310308
struct proc_maps_private {
311309
struct pid *pid;
312310
struct task_struct *task;

0 commit comments

Comments
 (0)