diff options
Diffstat (limited to 'include/linux/proc_fs.h')
-rw-r--r-- | include/linux/proc_fs.h | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index eaf4350c0f90..e7576cf9e32d 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -173,11 +173,7 @@ extern void proc_net_remove(struct net *net, const char *name); | |||
173 | extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, | 173 | extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, |
174 | struct proc_dir_entry *parent); | 174 | struct proc_dir_entry *parent); |
175 | 175 | ||
176 | /* While the {get|set|dup}_mm_exe_file functions are for mm_structs, they are | 176 | extern struct file *proc_ns_fget(int fd); |
177 | * only needed to implement /proc/<pid>|self/exe so we define them here. */ | ||
178 | extern void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file); | ||
179 | extern struct file *get_mm_exe_file(struct mm_struct *mm); | ||
180 | extern void dup_mm_exe_file(struct mm_struct *oldmm, struct mm_struct *newmm); | ||
181 | 177 | ||
182 | #else | 178 | #else |
183 | 179 | ||
@@ -228,19 +224,11 @@ static inline void pid_ns_release_proc(struct pid_namespace *ns) | |||
228 | { | 224 | { |
229 | } | 225 | } |
230 | 226 | ||
231 | static inline void set_mm_exe_file(struct mm_struct *mm, | 227 | static inline struct file *proc_ns_fget(int fd) |
232 | struct file *new_exe_file) | ||
233 | {} | ||
234 | |||
235 | static inline struct file *get_mm_exe_file(struct mm_struct *mm) | ||
236 | { | 228 | { |
237 | return NULL; | 229 | return ERR_PTR(-EINVAL); |
238 | } | 230 | } |
239 | 231 | ||
240 | static inline void dup_mm_exe_file(struct mm_struct *oldmm, | ||
241 | struct mm_struct *newmm) | ||
242 | {} | ||
243 | |||
244 | #endif /* CONFIG_PROC_FS */ | 232 | #endif /* CONFIG_PROC_FS */ |
245 | 233 | ||
246 | #if !defined(CONFIG_PROC_KCORE) | 234 | #if !defined(CONFIG_PROC_KCORE) |
@@ -252,6 +240,18 @@ kclist_add(struct kcore_list *new, void *addr, size_t size, int type) | |||
252 | extern void kclist_add(struct kcore_list *, void *, size_t, int type); | 240 | extern void kclist_add(struct kcore_list *, void *, size_t, int type); |
253 | #endif | 241 | #endif |
254 | 242 | ||
243 | struct nsproxy; | ||
244 | struct proc_ns_operations { | ||
245 | const char *name; | ||
246 | int type; | ||
247 | void *(*get)(struct task_struct *task); | ||
248 | void (*put)(void *ns); | ||
249 | int (*install)(struct nsproxy *nsproxy, void *ns); | ||
250 | }; | ||
251 | extern const struct proc_ns_operations netns_operations; | ||
252 | extern const struct proc_ns_operations utsns_operations; | ||
253 | extern const struct proc_ns_operations ipcns_operations; | ||
254 | |||
255 | union proc_op { | 255 | union proc_op { |
256 | int (*proc_get_link)(struct inode *, struct path *); | 256 | int (*proc_get_link)(struct inode *, struct path *); |
257 | int (*proc_read)(struct task_struct *task, char *page); | 257 | int (*proc_read)(struct task_struct *task, char *page); |
@@ -270,6 +270,8 @@ struct proc_inode { | |||
270 | struct proc_dir_entry *pde; | 270 | struct proc_dir_entry *pde; |
271 | struct ctl_table_header *sysctl; | 271 | struct ctl_table_header *sysctl; |
272 | struct ctl_table *sysctl_entry; | 272 | struct ctl_table *sysctl_entry; |
273 | void *ns; | ||
274 | const struct proc_ns_operations *ns_ops; | ||
273 | struct inode vfs_inode; | 275 | struct inode vfs_inode; |
274 | }; | 276 | }; |
275 | 277 | ||
@@ -288,12 +290,4 @@ static inline struct net *PDE_NET(struct proc_dir_entry *pde) | |||
288 | return pde->parent->data; | 290 | return pde->parent->data; |
289 | } | 291 | } |
290 | 292 | ||
291 | struct proc_maps_private { | ||
292 | struct pid *pid; | ||
293 | struct task_struct *task; | ||
294 | #ifdef CONFIG_MMU | ||
295 | struct vm_area_struct *tail_vma; | ||
296 | #endif | ||
297 | }; | ||
298 | |||
299 | #endif /* _LINUX_PROC_FS_H */ | 293 | #endif /* _LINUX_PROC_FS_H */ |