Lines Matching refs:net
32 static inline struct net *PDE_NET(struct proc_dir_entry *pde) in PDE_NET()
37 static struct net *get_proc_net(const struct inode *inode) in get_proc_net()
62 struct net *net; in seq_open_net() local
69 net = get_proc_net(inode); in seq_open_net()
70 if (!net) in seq_open_net()
75 put_net(net); in seq_open_net()
79 p->net = net; in seq_open_net()
166 struct net *net; in single_open_net() local
169 net = get_proc_net(inode); in single_open_net()
170 if (!net) in single_open_net()
173 err = single_open(file, de->single_show, net); in single_open_net()
175 put_net(net); in single_open_net()
254 static struct net *get_proc_task_net(struct inode *dir) in get_proc_task_net()
258 struct net *net = NULL; in get_proc_task_net() local
266 net = get_net(ns->net_ns); in get_proc_task_net()
271 return net; in get_proc_task_net()
278 struct net *net; in proc_tgid_net_lookup() local
281 net = get_proc_task_net(dir); in proc_tgid_net_lookup()
282 if (net != NULL) { in proc_tgid_net_lookup()
283 de = proc_lookup_de(dir, dentry, net->proc_net); in proc_tgid_net_lookup()
284 put_net(net); in proc_tgid_net_lookup()
293 struct net *net; in proc_tgid_net_getattr() local
295 net = get_proc_task_net(inode); in proc_tgid_net_getattr()
299 if (net != NULL) { in proc_tgid_net_getattr()
300 stat->nlink = net->proc_net->nlink; in proc_tgid_net_getattr()
301 put_net(net); in proc_tgid_net_getattr()
315 struct net *net; in proc_tgid_net_readdir() local
318 net = get_proc_task_net(file_inode(file)); in proc_tgid_net_readdir()
319 if (net != NULL) { in proc_tgid_net_readdir()
320 ret = proc_readdir_de(file, ctx, net->proc_net); in proc_tgid_net_readdir()
321 put_net(net); in proc_tgid_net_readdir()
332 static __net_init int proc_net_ns_init(struct net *net) in proc_net_ns_init() argument
345 netd->data = net; in proc_net_ns_init()
352 uid = make_kuid(net->user_ns, 0); in proc_net_ns_init()
356 gid = make_kgid(net->user_ns, 0); in proc_net_ns_init()
363 net_statd = proc_net_mkdir(net, "stat", netd); in proc_net_ns_init()
367 net->proc_net = netd; in proc_net_ns_init()
368 net->proc_net_stat = net_statd; in proc_net_ns_init()
377 static __net_exit void proc_net_ns_exit(struct net *net) in proc_net_ns_exit() argument
379 remove_proc_entry("stat", net->proc_net); in proc_net_ns_exit()
380 pde_free(net->proc_net); in proc_net_ns_exit()