diff options
Diffstat (limited to 'include/linux/proc_fs.h')
-rw-r--r-- | include/linux/proc_fs.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 838c1149251a..a6d2c6da5e5a 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -179,6 +179,8 @@ 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); | 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); | 180 | extern void dup_mm_exe_file(struct mm_struct *oldmm, struct mm_struct *newmm); |
181 | 181 | ||
182 | extern struct file *proc_ns_fget(int fd); | ||
183 | |||
182 | #else | 184 | #else |
183 | 185 | ||
184 | #define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; }) | 186 | #define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; }) |
@@ -239,6 +241,11 @@ static inline void dup_mm_exe_file(struct mm_struct *oldmm, | |||
239 | struct mm_struct *newmm) | 241 | struct mm_struct *newmm) |
240 | {} | 242 | {} |
241 | 243 | ||
244 | static inline struct file *proc_ns_fget(int fd) | ||
245 | { | ||
246 | return ERR_PTR(-EINVAL); | ||
247 | } | ||
248 | |||
242 | #endif /* CONFIG_PROC_FS */ | 249 | #endif /* CONFIG_PROC_FS */ |
243 | 250 | ||
244 | #if !defined(CONFIG_PROC_KCORE) | 251 | #if !defined(CONFIG_PROC_KCORE) |
@@ -250,6 +257,15 @@ kclist_add(struct kcore_list *new, void *addr, size_t size, int type) | |||
250 | extern void kclist_add(struct kcore_list *, void *, size_t, int type); | 257 | extern void kclist_add(struct kcore_list *, void *, size_t, int type); |
251 | #endif | 258 | #endif |
252 | 259 | ||
260 | struct nsproxy; | ||
261 | struct proc_ns_operations { | ||
262 | const char *name; | ||
263 | int type; | ||
264 | void *(*get)(struct task_struct *task); | ||
265 | void (*put)(void *ns); | ||
266 | int (*install)(struct nsproxy *nsproxy, void *ns); | ||
267 | }; | ||
268 | |||
253 | union proc_op { | 269 | union proc_op { |
254 | int (*proc_get_link)(struct inode *, struct path *); | 270 | int (*proc_get_link)(struct inode *, struct path *); |
255 | int (*proc_read)(struct task_struct *task, char *page); | 271 | int (*proc_read)(struct task_struct *task, char *page); |
@@ -268,6 +284,8 @@ struct proc_inode { | |||
268 | struct proc_dir_entry *pde; | 284 | struct proc_dir_entry *pde; |
269 | struct ctl_table_header *sysctl; | 285 | struct ctl_table_header *sysctl; |
270 | struct ctl_table *sysctl_entry; | 286 | struct ctl_table *sysctl_entry; |
287 | void *ns; | ||
288 | const struct proc_ns_operations *ns_ops; | ||
271 | struct inode vfs_inode; | 289 | struct inode vfs_inode; |
272 | }; | 290 | }; |
273 | 291 | ||