linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / include / linux / proc_fs.h
index 0c4d760..d79a132 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef _LINUX_PROC_FS_H
 #define _LINUX_PROC_FS_H
 
+#include <linux/config.h>
 #include <linux/slab.h>
 #include <linux/fs.h>
-#include <linux/spinlock.h>
 #include <asm/atomic.h>
 
 /*
@@ -56,9 +56,9 @@ struct proc_dir_entry {
        uid_t uid;
        gid_t gid;
        int vx_flags;
-       loff_t size;
+       unsigned long size;
        struct inode_operations * proc_iops;
-       const struct file_operations * proc_fops;
+       struct file_operations * proc_fops;
        get_info_t *get_info;
        struct module *owner;
        struct proc_dir_entry *next, *parent, *subdir;
@@ -93,15 +93,14 @@ extern struct proc_dir_entry *proc_bus;
 extern struct proc_dir_entry *proc_root_driver;
 extern struct proc_dir_entry *proc_root_kcore;
 
-extern spinlock_t proc_subdir_lock;
-
 extern void proc_root_init(void);
 extern void proc_misc_init(void);
 
 struct mm_struct;
 
-void proc_flush_task(struct task_struct *task);
 struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *);
+struct dentry *proc_pid_unhash(struct task_struct *p);
+void proc_pid_flush(struct dentry *proc_dentry);
 int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir);
 unsigned long task_vsize(struct mm_struct *);
 int task_statm(struct mm_struct *, int *, int *, int *, int *);
@@ -127,9 +126,9 @@ extern int proc_match(int, const char *,struct proc_dir_entry *);
 extern int proc_readdir(struct file *, void *, filldir_t);
 extern struct dentry *proc_lookup(struct inode *, struct dentry *, struct nameidata *);
 
-extern const struct file_operations proc_kcore_operations;
-extern const struct file_operations proc_kmsg_operations;
-extern const struct file_operations ppc_htab_operations;
+extern struct file_operations proc_kcore_operations;
+extern struct file_operations proc_kmsg_operations;
+extern struct file_operations ppc_htab_operations;
 
 /*
  * proc_tty.c
@@ -188,7 +187,7 @@ static inline struct proc_dir_entry *proc_net_create(const char *name,
 }
 
 static inline struct proc_dir_entry *proc_net_fops_create(const char *name,
-       mode_t mode, const struct file_operations *fops)
+       mode_t mode, struct file_operations *fops)
 {
        struct proc_dir_entry *res = create_proc_entry(name, mode, proc_net);
        if (res)
@@ -211,7 +210,8 @@ static inline void proc_net_remove(const char *name)
 #define proc_net_create(name, mode, info)      ({ (void)(mode), NULL; })
 static inline void proc_net_remove(const char *name) {}
 
-static inline void proc_flush_task(struct task_struct *task) { }
+static inline struct dentry *proc_pid_unhash(struct task_struct *p) { return NULL; }
+static inline void proc_pid_flush(struct dentry *proc_dentry) { }
 
 static inline struct proc_dir_entry *create_proc_entry(const char *name,
        mode_t mode, struct proc_dir_entry *parent) { return NULL; }
@@ -247,9 +247,9 @@ extern void kclist_add(struct kcore_list *, void *, size_t);
 #endif
 
 struct proc_inode {
-       struct pid *pid;
+       struct task_struct *task;
+       int type;
        int vx_flags;
-       int fd;
        union {
                int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **);
                int (*proc_read)(struct task_struct *task, char *page);
@@ -269,10 +269,4 @@ static inline struct proc_dir_entry *PDE(const struct inode *inode)
        return PROC_I(inode)->pde;
 }
 
-struct proc_maps_private {
-       struct pid *pid;
-       struct task_struct *task;
-       struct vm_area_struct *tail_vma;
-};
-
 #endif /* _LINUX_PROC_FS_H */