aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2013-04-11 08:34:43 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-01 17:29:47 -0400
commit59d8053f1e16904d54ed7469d4b36801ea6b8f2c (patch)
treeca3879f5ffd0b4b9f89fbdc1b95d409793a1dc79
parentc30480b92cf497aa3b463367a82f1c2fdc5c46e9 (diff)
proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
Move non-public declarations and definitions from linux/proc_fs.h to fs/proc/internal.h. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/proc/internal.h307
-rw-r--r--fs/proc/kcore.c1
-rw-r--r--include/linux/proc_fs.h140
3 files changed, 230 insertions, 218 deletions
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index 86a24060e1b9..04255b6e96b7 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -1,4 +1,4 @@
1/* internal.h: internal procfs definitions 1/* Internal procfs definitions
2 * 2 *
3 * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. 3 * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com) 4 * Written by David Howells (dhowells@redhat.com)
@@ -9,81 +9,66 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/sched.h>
13#include <linux/proc_fs.h> 12#include <linux/proc_fs.h>
13#include <linux/proc_ns.h>
14#include <linux/spinlock.h>
15#include <linux/atomic.h>
14#include <linux/binfmts.h> 16#include <linux/binfmts.h>
15struct ctl_table_header;
16struct mempolicy;
17 17
18extern struct proc_dir_entry proc_root; 18struct ctl_table_header;
19extern void proc_self_init(void); 19struct mempolicy;
20#ifdef CONFIG_PROC_SYSCTL
21extern int proc_sys_init(void);
22extern void sysctl_head_put(struct ctl_table_header *head);
23#else
24static inline void proc_sys_init(void) { }
25static inline void sysctl_head_put(struct ctl_table_header *head) { }
26#endif
27#ifdef CONFIG_NET
28extern int proc_net_init(void);
29#else
30static inline int proc_net_init(void) { return 0; }
31#endif
32 20
33struct vmalloc_info { 21/*
34 unsigned long used; 22 * This is not completely implemented yet. The idea is to
35 unsigned long largest_chunk; 23 * create an in-memory tree (like the actual /proc filesystem
24 * tree) of these proc_dir_entries, so that we can dynamically
25 * add new files to /proc.
26 *
27 * The "next" pointer creates a linked list of one /proc directory,
28 * while parent/subdir create the directory structure (every
29 * /proc file has a parent, but "subdir" is NULL for all
30 * non-directory entries).
31 */
32struct proc_dir_entry {
33 unsigned int low_ino;
34 umode_t mode;
35 nlink_t nlink;
36 kuid_t uid;
37 kgid_t gid;
38 loff_t size;
39 const struct inode_operations *proc_iops;
40 const struct file_operations *proc_fops;
41 struct proc_dir_entry *next, *parent, *subdir;
42 void *data;
43 atomic_t count; /* use count */
44 atomic_t in_use; /* number of callers into module in progress; */
45 /* negative -> it's going away RSN */
46 struct completion *pde_unload_completion;
47 struct list_head pde_openers; /* who did ->open, but not ->release */
48 spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */
49 u8 namelen;
50 char name[];
36}; 51};
37 52
38#ifdef CONFIG_MMU 53union proc_op {
39#define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START) 54 int (*proc_get_link)(struct dentry *, struct path *);
40extern void get_vmalloc_info(struct vmalloc_info *vmi); 55 int (*proc_read)(struct task_struct *task, char *page);
41#else 56 int (*proc_show)(struct seq_file *m,
42 57 struct pid_namespace *ns, struct pid *pid,
43#define VMALLOC_TOTAL 0UL 58 struct task_struct *task);
44#define get_vmalloc_info(vmi) \ 59};
45do { \
46 (vmi)->used = 0; \
47 (vmi)->largest_chunk = 0; \
48} while(0)
49#endif
50
51extern int proc_tid_stat(struct seq_file *m, struct pid_namespace *ns,
52 struct pid *pid, struct task_struct *task);
53extern int proc_tgid_stat(struct seq_file *m, struct pid_namespace *ns,
54 struct pid *pid, struct task_struct *task);
55extern int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
56 struct pid *pid, struct task_struct *task);
57extern int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
58 struct pid *pid, struct task_struct *task);
59extern loff_t mem_lseek(struct file *file, loff_t offset, int orig);
60
61extern const struct file_operations proc_tid_children_operations;
62extern const struct file_operations proc_pid_maps_operations;
63extern const struct file_operations proc_tid_maps_operations;
64extern const struct file_operations proc_pid_numa_maps_operations;
65extern const struct file_operations proc_tid_numa_maps_operations;
66extern const struct file_operations proc_pid_smaps_operations;
67extern const struct file_operations proc_tid_smaps_operations;
68extern const struct file_operations proc_clear_refs_operations;
69extern const struct file_operations proc_pagemap_operations;
70extern const struct file_operations proc_net_operations;
71extern const struct inode_operations proc_net_inode_operations;
72extern const struct inode_operations proc_pid_link_inode_operations;
73 60
74struct proc_maps_private { 61struct proc_inode {
75 struct pid *pid; 62 struct pid *pid;
76 struct task_struct *task; 63 int fd;
77#ifdef CONFIG_MMU 64 union proc_op op;
78 struct vm_area_struct *tail_vma; 65 struct proc_dir_entry *pde;
79#endif 66 struct ctl_table_header *sysctl;
80#ifdef CONFIG_NUMA 67 struct ctl_table *sysctl_entry;
81 struct mempolicy *task_mempolicy; 68 struct proc_ns ns;
82#endif 69 struct inode vfs_inode;
83}; 70};
84 71
85void proc_init_inodecache(void);
86
87/* 72/*
88 * General functions 73 * General functions
89 */ 74 */
@@ -150,79 +135,142 @@ out:
150} 135}
151 136
152/* 137/*
153 * base.c 138 * Offset of the first process in the /proc root directory..
154 */ 139 */
155extern int pid_delete_dentry(const struct dentry *); 140#define FIRST_PROCESS_ENTRY 256
156 141
157struct dentry *proc_lookup_de(struct proc_dir_entry *de, struct inode *ino, 142/* Worst case buffer size needed for holding an integer. */
158 struct dentry *dentry); 143#define PROC_NUMBUF 13
159int proc_readdir_de(struct proc_dir_entry *de, struct file *filp, void *dirent,
160 filldir_t filldir);
161 144
162struct pde_opener { 145/*
163 struct file *file; 146 * array.c
164 struct list_head lh; 147 */
165 int closing; 148extern const struct file_operations proc_tid_children_operations;
166 struct completion *c; 149
167}; 150extern int proc_tid_stat(struct seq_file *, struct pid_namespace *,
151 struct pid *, struct task_struct *);
152extern int proc_tgid_stat(struct seq_file *, struct pid_namespace *,
153 struct pid *, struct task_struct *);
154extern int proc_pid_status(struct seq_file *, struct pid_namespace *,
155 struct pid *, struct task_struct *);
156extern int proc_pid_statm(struct seq_file *, struct pid_namespace *,
157 struct pid *, struct task_struct *);
158
159/*
160 * base.c
161 */
162extern const struct dentry_operations pid_dentry_operations;
163extern int pid_getattr(struct vfsmount *, struct dentry *, struct kstat *);
164extern int proc_setattr(struct dentry *, struct iattr *);
165extern struct inode *proc_pid_make_inode(struct super_block *, struct task_struct *);
166extern int pid_revalidate(struct dentry *, unsigned int);
167extern int pid_delete_dentry(const struct dentry *);
168extern int proc_pid_readdir(struct file *, void *, filldir_t);
169extern struct dentry *proc_pid_lookup(struct inode *, struct dentry *, unsigned int);
170extern loff_t mem_lseek(struct file *, loff_t, int);
168 171
169void proc_entry_rundown(struct proc_dir_entry *); 172/* Lookups */
173typedef struct dentry *instantiate_t(struct inode *, struct dentry *,
174 struct task_struct *, const void *);
175extern int proc_fill_cache(struct file *, void *, filldir_t, const char *, int,
176 instantiate_t, struct task_struct *, const void *);
170 177
178/*
179 * generic.c
180 */
171extern spinlock_t proc_subdir_lock; 181extern spinlock_t proc_subdir_lock;
172 182
173struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, unsigned int); 183extern struct dentry *proc_lookup(struct inode *, struct dentry *, unsigned int);
174int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); 184extern struct dentry *proc_lookup_de(struct proc_dir_entry *, struct inode *,
175unsigned long task_vsize(struct mm_struct *); 185 struct dentry *);
176unsigned long task_statm(struct mm_struct *, 186extern int proc_readdir(struct file *, void *, filldir_t);
177 unsigned long *, unsigned long *, unsigned long *, unsigned long *); 187extern int proc_readdir_de(struct proc_dir_entry *, struct file *, void *, filldir_t);
178void task_mem(struct seq_file *, struct mm_struct *);
179 188
180static inline struct proc_dir_entry *pde_get(struct proc_dir_entry *pde) 189static inline struct proc_dir_entry *pde_get(struct proc_dir_entry *pde)
181{ 190{
182 atomic_inc(&pde->count); 191 atomic_inc(&pde->count);
183 return pde; 192 return pde;
184} 193}
185void pde_put(struct proc_dir_entry *pde); 194extern void pde_put(struct proc_dir_entry *);
195
196/*
197 * inode.c
198 */
199struct pde_opener {
200 struct file *file;
201 struct list_head lh;
202 int closing;
203 struct completion *c;
204};
186 205
187int proc_fill_super(struct super_block *); 206extern const struct inode_operations proc_pid_link_inode_operations;
188struct inode *proc_get_inode(struct super_block *, struct proc_dir_entry *); 207
189int proc_remount(struct super_block *sb, int *flags, char *data); 208extern void proc_init_inodecache(void);
209extern struct inode *proc_get_inode(struct super_block *, struct proc_dir_entry *);
210extern int proc_fill_super(struct super_block *);
211extern void proc_entry_rundown(struct proc_dir_entry *);
190 212
191/* 213/*
192 * These are generic /proc routines that use the internal 214 * mmu.c
193 * "struct proc_dir_entry" tree to traverse the filesystem.
194 *
195 * The /proc root directory has extended versions to take care
196 * of the /proc/<pid> subdirectories.
197 */ 215 */
198int proc_readdir(struct file *, void *, filldir_t); 216struct vmalloc_info {
199struct dentry *proc_lookup(struct inode *, struct dentry *, unsigned int); 217 unsigned long used;
218 unsigned long largest_chunk;
219};
200 220
221#ifdef CONFIG_MMU
222#define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START)
223extern void get_vmalloc_info(struct vmalloc_info *);
201 224
225#else
226#define VMALLOC_TOTAL 0UL
227static inline void get_vmalloc_info(struct vmalloc_info *vmi)
228{
229 vmi->used = 0;
230 vmi->largest_chunk = 0;
231}
232#endif
202 233
203/* Lookups */ 234/*
204typedef struct dentry *instantiate_t(struct inode *, struct dentry *, 235 * proc_devtree.c
205 struct task_struct *, const void *); 236 */
206int proc_fill_cache(struct file *filp, void *dirent, filldir_t filldir, 237#ifdef CONFIG_PROC_DEVICETREE
207 const char *name, int len, 238extern void proc_device_tree_init(void);
208 instantiate_t instantiate, struct task_struct *task, const void *ptr); 239#endif
209int pid_revalidate(struct dentry *dentry, unsigned int flags);
210struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct *task);
211extern const struct dentry_operations pid_dentry_operations;
212int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat);
213int proc_setattr(struct dentry *dentry, struct iattr *attr);
214 240
241/*
242 * proc_namespaces.c
243 */
215extern const struct inode_operations proc_ns_dir_inode_operations; 244extern const struct inode_operations proc_ns_dir_inode_operations;
216extern const struct file_operations proc_ns_dir_operations; 245extern const struct file_operations proc_ns_dir_operations;
217 246
247/*
248 * proc_net.c
249 */
250extern const struct file_operations proc_net_operations;
251extern const struct inode_operations proc_net_inode_operations;
252
253#ifdef CONFIG_NET
254extern int proc_net_init(void);
255#else
256static inline int proc_net_init(void) { return 0; }
257#endif
258
259/*
260 * proc_self.c
261 */
218extern int proc_setup_self(struct super_block *); 262extern int proc_setup_self(struct super_block *);
219 263
220/* 264/*
221 * proc_devtree.c 265 * proc_sysctl.c
222 */ 266 */
223#ifdef CONFIG_PROC_DEVICETREE 267#ifdef CONFIG_PROC_SYSCTL
224extern void proc_device_tree_init(void); 268extern int proc_sys_init(void);
225#endif /* CONFIG_PROC_DEVICETREE */ 269extern void sysctl_head_put(struct ctl_table_header *);
270#else
271static inline void proc_sys_init(void) { }
272static inline void sysctl_head_put(struct ctl_table_header *head) { }
273#endif
226 274
227/* 275/*
228 * proc_tty.c 276 * proc_tty.c
@@ -232,3 +280,40 @@ extern void proc_tty_init(void);
232#else 280#else
233static inline void proc_tty_init(void) {} 281static inline void proc_tty_init(void) {}
234#endif 282#endif
283
284/*
285 * root.c
286 */
287extern struct proc_dir_entry proc_root;
288
289extern void proc_self_init(void);
290extern int proc_remount(struct super_block *, int *, char *);
291
292/*
293 * task_[no]mmu.c
294 */
295struct proc_maps_private {
296 struct pid *pid;
297 struct task_struct *task;
298#ifdef CONFIG_MMU
299 struct vm_area_struct *tail_vma;
300#endif
301#ifdef CONFIG_NUMA
302 struct mempolicy *task_mempolicy;
303#endif
304};
305
306extern const struct file_operations proc_pid_maps_operations;
307extern const struct file_operations proc_tid_maps_operations;
308extern const struct file_operations proc_pid_numa_maps_operations;
309extern const struct file_operations proc_tid_numa_maps_operations;
310extern const struct file_operations proc_pid_smaps_operations;
311extern const struct file_operations proc_tid_smaps_operations;
312extern const struct file_operations proc_clear_refs_operations;
313extern const struct file_operations proc_pagemap_operations;
314
315extern unsigned long task_vsize(struct mm_struct *);
316extern unsigned long task_statm(struct mm_struct *,
317 unsigned long *, unsigned long *,
318 unsigned long *, unsigned long *);
319extern void task_mem(struct seq_file *, struct mm_struct *);
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
index 8e6ce830de44..13cf87c4686f 100644
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -28,6 +28,7 @@
28#include <linux/ioport.h> 28#include <linux/ioport.h>
29#include <linux/memory.h> 29#include <linux/memory.h>
30#include <asm/sections.h> 30#include <asm/sections.h>
31#include "internal.h"
31 32
32#define CORE_STR "CORE" 33#define CORE_STR "CORE"
33 34
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 2112926de854..608e60a74c3c 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -1,148 +1,74 @@
1#ifndef _LINUX_PROC_FS_H
2#define _LINUX_PROC_FS_H
3
4#include <linux/slab.h>
5#include <linux/fs.h>
6#include <linux/spinlock.h>
7#include <linux/magic.h>
8#include <linux/atomic.h>
9#include <linux/proc_ns.h>
10
11struct net;
12struct completion;
13struct mm_struct;
14
15/* 1/*
16 * The proc filesystem constants/structures 2 * The proc filesystem constants/structures
17 */ 3 */
4#ifndef _LINUX_PROC_FS_H
5#define _LINUX_PROC_FS_H
18 6
19/* 7#include <linux/types.h>
20 * Offset of the first process in the /proc root directory.. 8#include <linux/fs.h>
21 */
22#define FIRST_PROCESS_ENTRY 256
23
24/* Worst case buffer size needed for holding an integer. */
25#define PROC_NUMBUF 13
26
27/*
28 * This is not completely implemented yet. The idea is to
29 * create an in-memory tree (like the actual /proc filesystem
30 * tree) of these proc_dir_entries, so that we can dynamically
31 * add new files to /proc.
32 *
33 * The "next" pointer creates a linked list of one /proc directory,
34 * while parent/subdir create the directory structure (every
35 * /proc file has a parent, but "subdir" is NULL for all
36 * non-directory entries).
37 */
38 9
39struct proc_dir_entry { 10struct proc_dir_entry;
40 unsigned int low_ino;
41 umode_t mode;
42 nlink_t nlink;
43 kuid_t uid;
44 kgid_t gid;
45 loff_t size;
46 const struct inode_operations *proc_iops;
47 const struct file_operations *proc_fops;
48 struct proc_dir_entry *next, *parent, *subdir;
49 void *data;
50 atomic_t count; /* use count */
51 atomic_t in_use; /* number of callers into module in progress; */
52 /* negative -> it's going away RSN */
53 struct completion *pde_unload_completion;
54 struct list_head pde_openers; /* who did ->open, but not ->release */
55 spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */
56 u8 namelen;
57 char name[];
58};
59 11
60#ifdef CONFIG_PROC_FS 12#ifdef CONFIG_PROC_FS
61 13
62extern void proc_root_init(void); 14extern void proc_root_init(void);
63 15extern void proc_flush_task(struct task_struct *);
64void proc_flush_task(struct task_struct *task);
65
66struct proc_dir_entry *proc_create_data(const char *name, umode_t mode,
67 struct proc_dir_entry *parent,
68 const struct file_operations *proc_fops,
69 void *data);
70extern void proc_remove(struct proc_dir_entry *);
71extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent);
72extern int remove_proc_subtree(const char *name, struct proc_dir_entry *parent);
73 16
74extern struct proc_dir_entry *proc_symlink(const char *, 17extern struct proc_dir_entry *proc_symlink(const char *,
75 struct proc_dir_entry *, const char *); 18 struct proc_dir_entry *, const char *);
76extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *); 19extern struct proc_dir_entry *proc_mkdir(const char *, struct proc_dir_entry *);
77extern struct proc_dir_entry *proc_mkdir_data(const char *, umode_t, 20extern struct proc_dir_entry *proc_mkdir_data(const char *, umode_t,
78 struct proc_dir_entry *, void *); 21 struct proc_dir_entry *, void *);
79extern struct proc_dir_entry *proc_mkdir_mode(const char *name, umode_t mode, 22extern struct proc_dir_entry *proc_mkdir_mode(const char *, umode_t,
80 struct proc_dir_entry *parent); 23 struct proc_dir_entry *);
81 24
82static inline struct proc_dir_entry *proc_create(const char *name, umode_t mode, 25extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
83 struct proc_dir_entry *parent, const struct file_operations *proc_fops) 26 struct proc_dir_entry *,
27 const struct file_operations *,
28 void *);
29
30static inline struct proc_dir_entry *proc_create(
31 const char *name, umode_t mode, struct proc_dir_entry *parent,
32 const struct file_operations *proc_fops)
84{ 33{
85 return proc_create_data(name, mode, parent, proc_fops, NULL); 34 return proc_create_data(name, mode, parent, proc_fops, NULL);
86} 35}
87 36
88extern void proc_set_size(struct proc_dir_entry *, loff_t); 37extern void proc_set_size(struct proc_dir_entry *, loff_t);
89extern void proc_set_user(struct proc_dir_entry *, kuid_t, kgid_t); 38extern void proc_set_user(struct proc_dir_entry *, kuid_t, kgid_t);
90extern void *PDE_DATA(const struct inode *); 39extern void *PDE_DATA(const struct inode *);
91extern void *proc_get_parent_data(const struct inode *); 40extern void *proc_get_parent_data(const struct inode *);
92#else 41extern void proc_remove(struct proc_dir_entry *);
42extern void remove_proc_entry(const char *, struct proc_dir_entry *);
43extern int remove_proc_subtree(const char *, struct proc_dir_entry *);
44
45#else /* CONFIG_PROC_FS */
93 46
94static inline void proc_flush_task(struct task_struct *task) 47static inline void proc_flush_task(struct task_struct *task)
95{ 48{
96} 49}
97 50
98#define proc_create(name, mode, parent, fops) ({ (void)(mode), NULL; })
99
100static inline struct proc_dir_entry *proc_create_data(const char *name,
101 umode_t mode, struct proc_dir_entry *parent,
102 const struct file_operations *proc_fops, void *data)
103{
104 return NULL;
105}
106static inline void proc_remove(struct proc_dir_entry *de) {}
107#define remove_proc_entry(name, parent) do {} while (0)
108#define remove_proc_subtree(name, parent) do {} while (0)
109
110static inline struct proc_dir_entry *proc_symlink(const char *name, 51static inline struct proc_dir_entry *proc_symlink(const char *name,
111 struct proc_dir_entry *parent,const char *dest) {return NULL;} 52 struct proc_dir_entry *parent,const char *dest) { return NULL;}
112static inline struct proc_dir_entry *proc_mkdir(const char *name, 53static inline struct proc_dir_entry *proc_mkdir(const char *name,
113 struct proc_dir_entry *parent) {return NULL;} 54 struct proc_dir_entry *parent) {return NULL;}
114static inline struct proc_dir_entry *proc_mkdir_data(const char *name, 55static inline struct proc_dir_entry *proc_mkdir_data(const char *name,
115 umode_t mode, struct proc_dir_entry *parent, void *data) { return NULL; } 56 umode_t mode, struct proc_dir_entry *parent, void *data) { return NULL; }
116static inline struct proc_dir_entry *proc_mkdir_mode(const char *name, 57static inline struct proc_dir_entry *proc_mkdir_mode(const char *name,
117 umode_t mode, struct proc_dir_entry *parent) { return NULL; } 58 umode_t mode, struct proc_dir_entry *parent) { return NULL; }
59#define proc_create(name, mode, parent, proc_fops) ({NULL;})
60#define proc_create_data(name, mode, parent, proc_fops, data) ({NULL;})
61
118static inline void proc_set_size(struct proc_dir_entry *de, loff_t size) {} 62static inline void proc_set_size(struct proc_dir_entry *de, loff_t size) {}
119static inline void proc_set_user(struct proc_dir_entry *de, kuid_t uid, kgid_t gid) {} 63static inline void proc_set_user(struct proc_dir_entry *de, kuid_t uid, kgid_t gid) {}
120static inline void *PDE_DATA(const struct inode *inode) {BUG(); return NULL;} 64static inline void *PDE_DATA(const struct inode *inode) {BUG(); return NULL;}
65static inline void *proc_get_parent_data(const struct inode *inode) { BUG(); return NULL; }
121 66
122#endif /* CONFIG_PROC_FS */ 67static inline void proc_remove(struct proc_dir_entry *de) {}
123 68#define remove_proc_entry(name, parent) do {} while (0)
124 69static inline int remove_proc_subtree(const char *name, struct proc_dir_entry *parent) { return 0; }
125union proc_op {
126 int (*proc_get_link)(struct dentry *, struct path *);
127 int (*proc_read)(struct task_struct *task, char *page);
128 int (*proc_show)(struct seq_file *m,
129 struct pid_namespace *ns, struct pid *pid,
130 struct task_struct *task);
131};
132
133struct ctl_table_header;
134struct ctl_table;
135 70
136struct proc_inode { 71#endif /* CONFIG_PROC_FS */
137 struct pid *pid;
138 int fd;
139 union proc_op op;
140 struct proc_dir_entry *pde;
141 struct ctl_table_header *sysctl;
142 struct ctl_table *sysctl_entry;
143 struct proc_ns ns;
144 struct inode vfs_inode;
145};
146 72
147static inline struct proc_dir_entry *proc_net_mkdir( 73static inline struct proc_dir_entry *proc_net_mkdir(
148 struct net *net, const char *name, struct proc_dir_entry *parent) 74 struct net *net, const char *name, struct proc_dir_entry *parent)