Lines Matching refs:net

31 static inline struct net *PDE_NET(struct proc_dir_entry *pde)  in PDE_NET()
36 static struct net *get_proc_net(const struct inode *inode) in get_proc_net()
45 struct net *net; in seq_open_net() local
52 net = get_proc_net(inode); in seq_open_net()
53 if (!net) in seq_open_net()
58 put_net(net); in seq_open_net()
62 p->net = net; in seq_open_net()
149 struct net *net; in single_open_net() local
152 net = get_proc_net(inode); in single_open_net()
153 if (!net) in single_open_net()
156 err = single_open(file, de->single_show, net); in single_open_net()
158 put_net(net); in single_open_net()
237 static struct net *get_proc_task_net(struct inode *dir) in get_proc_task_net()
241 struct net *net = NULL; in get_proc_task_net() local
249 net = get_net(ns->net_ns); in get_proc_task_net()
254 return net; in get_proc_task_net()
261 struct net *net; in proc_tgid_net_lookup() local
264 net = get_proc_task_net(dir); in proc_tgid_net_lookup()
265 if (net != NULL) { in proc_tgid_net_lookup()
266 de = proc_lookup_de(dir, dentry, net->proc_net); in proc_tgid_net_lookup()
267 put_net(net); in proc_tgid_net_lookup()
276 struct net *net; in proc_tgid_net_getattr() local
278 net = get_proc_task_net(inode); in proc_tgid_net_getattr()
282 if (net != NULL) { in proc_tgid_net_getattr()
283 stat->nlink = net->proc_net->nlink; in proc_tgid_net_getattr()
284 put_net(net); in proc_tgid_net_getattr()
298 struct net *net; in proc_tgid_net_readdir() local
301 net = get_proc_task_net(file_inode(file)); in proc_tgid_net_readdir()
302 if (net != NULL) { in proc_tgid_net_readdir()
303 ret = proc_readdir_de(file, ctx, net->proc_net); in proc_tgid_net_readdir()
304 put_net(net); in proc_tgid_net_readdir()
315 static __net_init int proc_net_ns_init(struct net *net) in proc_net_ns_init() argument
328 netd->data = net; in proc_net_ns_init()
335 uid = make_kuid(net->user_ns, 0); in proc_net_ns_init()
339 gid = make_kgid(net->user_ns, 0); in proc_net_ns_init()
349 net_statd = proc_net_mkdir(net, "stat", netd); in proc_net_ns_init()
353 net->proc_net = netd; in proc_net_ns_init()
354 net->proc_net_stat = net_statd; in proc_net_ns_init()
363 static __net_exit void proc_net_ns_exit(struct net *net) in proc_net_ns_exit() argument
365 remove_proc_entry("stat", net->proc_net); in proc_net_ns_exit()
366 pde_free(net->proc_net); in proc_net_ns_exit()