aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/proc_fs.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/proc_fs.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'include/linux/proc_fs.h')
-rw-r--r--include/linux/proc_fs.h44
1 files changed, 20 insertions, 24 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 379eaed72d4b..e7576cf9e32d 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -50,7 +50,7 @@ typedef int (write_proc_t)(struct file *file, const char __user *buffer,
50 50
51struct proc_dir_entry { 51struct proc_dir_entry {
52 unsigned int low_ino; 52 unsigned int low_ino;
53 unsigned short namelen; 53 unsigned int namelen;
54 const char *name; 54 const char *name;
55 mode_t mode; 55 mode_t mode;
56 nlink_t nlink; 56 nlink_t nlink;
@@ -173,11 +173,7 @@ extern void proc_net_remove(struct net *net, const char *name);
173extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, 173extern 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 176extern struct file *proc_ns_fget(int fd);
177 * only needed to implement /proc/<pid>|self/exe so we define them here. */
178extern void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file);
179extern struct file *get_mm_exe_file(struct mm_struct *mm);
180extern void dup_mm_exe_file(struct mm_struct *oldmm, struct mm_struct *newmm);
181 177
182#else 178#else
183 179
@@ -208,6 +204,8 @@ static inline struct proc_dir_entry *proc_symlink(const char *name,
208 struct proc_dir_entry *parent,const char *dest) {return NULL;} 204 struct proc_dir_entry *parent,const char *dest) {return NULL;}
209static inline struct proc_dir_entry *proc_mkdir(const char *name, 205static inline struct proc_dir_entry *proc_mkdir(const char *name,
210 struct proc_dir_entry *parent) {return NULL;} 206 struct proc_dir_entry *parent) {return NULL;}
207static inline struct proc_dir_entry *proc_mkdir_mode(const char *name,
208 mode_t mode, struct proc_dir_entry *parent) { return NULL; }
211 209
212static inline struct proc_dir_entry *create_proc_read_entry(const char *name, 210static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
213 mode_t mode, struct proc_dir_entry *base, 211 mode_t mode, struct proc_dir_entry *base,
@@ -226,19 +224,11 @@ static inline void pid_ns_release_proc(struct pid_namespace *ns)
226{ 224{
227} 225}
228 226
229static inline void set_mm_exe_file(struct mm_struct *mm, 227static inline struct file *proc_ns_fget(int fd)
230 struct file *new_exe_file)
231{}
232
233static inline struct file *get_mm_exe_file(struct mm_struct *mm)
234{ 228{
235 return NULL; 229 return ERR_PTR(-EINVAL);
236} 230}
237 231
238static inline void dup_mm_exe_file(struct mm_struct *oldmm,
239 struct mm_struct *newmm)
240{}
241
242#endif /* CONFIG_PROC_FS */ 232#endif /* CONFIG_PROC_FS */
243 233
244#if !defined(CONFIG_PROC_KCORE) 234#if !defined(CONFIG_PROC_KCORE)
@@ -250,6 +240,18 @@ kclist_add(struct kcore_list *new, void *addr, size_t size, int type)
250extern void kclist_add(struct kcore_list *, void *, size_t, int type); 240extern void kclist_add(struct kcore_list *, void *, size_t, int type);
251#endif 241#endif
252 242
243struct nsproxy;
244struct 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};
251extern const struct proc_ns_operations netns_operations;
252extern const struct proc_ns_operations utsns_operations;
253extern const struct proc_ns_operations ipcns_operations;
254
253union proc_op { 255union proc_op {
254 int (*proc_get_link)(struct inode *, struct path *); 256 int (*proc_get_link)(struct inode *, struct path *);
255 int (*proc_read)(struct task_struct *task, char *page); 257 int (*proc_read)(struct task_struct *task, char *page);
@@ -268,6 +270,8 @@ struct proc_inode {
268 struct proc_dir_entry *pde; 270 struct proc_dir_entry *pde;
269 struct ctl_table_header *sysctl; 271 struct ctl_table_header *sysctl;
270 struct ctl_table *sysctl_entry; 272 struct ctl_table *sysctl_entry;
273 void *ns;
274 const struct proc_ns_operations *ns_ops;
271 struct inode vfs_inode; 275 struct inode vfs_inode;
272}; 276};
273 277
@@ -286,12 +290,4 @@ static inline struct net *PDE_NET(struct proc_dir_entry *pde)
286 return pde->parent->data; 290 return pde->parent->data;
287} 291}
288 292
289struct proc_maps_private {
290 struct pid *pid;
291 struct task_struct *task;
292#ifdef CONFIG_MMU
293 struct vm_area_struct *tail_vma;
294#endif
295};
296
297#endif /* _LINUX_PROC_FS_H */ 293#endif /* _LINUX_PROC_FS_H */