diff options
Diffstat (limited to 'include/linux/proc_fs.h')
-rw-r--r-- | include/linux/proc_fs.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index aa6322d45198..135871df9911 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | #include <linux/slab.h> | 5 | #include <linux/slab.h> |
6 | #include <linux/fs.h> | 6 | #include <linux/fs.h> |
7 | #include <linux/spinlock.h> | ||
7 | #include <asm/atomic.h> | 8 | #include <asm/atomic.h> |
8 | 9 | ||
9 | /* | 10 | /* |
@@ -55,9 +56,9 @@ struct proc_dir_entry { | |||
55 | nlink_t nlink; | 56 | nlink_t nlink; |
56 | uid_t uid; | 57 | uid_t uid; |
57 | gid_t gid; | 58 | gid_t gid; |
58 | unsigned long size; | 59 | loff_t size; |
59 | struct inode_operations * proc_iops; | 60 | struct inode_operations * proc_iops; |
60 | struct file_operations * proc_fops; | 61 | const struct file_operations * proc_fops; |
61 | get_info_t *get_info; | 62 | get_info_t *get_info; |
62 | struct module *owner; | 63 | struct module *owner; |
63 | struct proc_dir_entry *next, *parent, *subdir; | 64 | struct proc_dir_entry *next, *parent, *subdir; |
@@ -92,6 +93,8 @@ extern struct proc_dir_entry *proc_bus; | |||
92 | extern struct proc_dir_entry *proc_root_driver; | 93 | extern struct proc_dir_entry *proc_root_driver; |
93 | extern struct proc_dir_entry *proc_root_kcore; | 94 | extern struct proc_dir_entry *proc_root_kcore; |
94 | 95 | ||
96 | extern spinlock_t proc_subdir_lock; | ||
97 | |||
95 | extern void proc_root_init(void); | 98 | extern void proc_root_init(void); |
96 | extern void proc_misc_init(void); | 99 | extern void proc_misc_init(void); |
97 | 100 | ||
@@ -125,9 +128,9 @@ extern int proc_match(int, const char *,struct proc_dir_entry *); | |||
125 | extern int proc_readdir(struct file *, void *, filldir_t); | 128 | extern int proc_readdir(struct file *, void *, filldir_t); |
126 | extern struct dentry *proc_lookup(struct inode *, struct dentry *, struct nameidata *); | 129 | extern struct dentry *proc_lookup(struct inode *, struct dentry *, struct nameidata *); |
127 | 130 | ||
128 | extern struct file_operations proc_kcore_operations; | 131 | extern const struct file_operations proc_kcore_operations; |
129 | extern struct file_operations proc_kmsg_operations; | 132 | extern const struct file_operations proc_kmsg_operations; |
130 | extern struct file_operations ppc_htab_operations; | 133 | extern const struct file_operations ppc_htab_operations; |
131 | 134 | ||
132 | /* | 135 | /* |
133 | * proc_tty.c | 136 | * proc_tty.c |
@@ -186,7 +189,7 @@ static inline struct proc_dir_entry *proc_net_create(const char *name, | |||
186 | } | 189 | } |
187 | 190 | ||
188 | static inline struct proc_dir_entry *proc_net_fops_create(const char *name, | 191 | static inline struct proc_dir_entry *proc_net_fops_create(const char *name, |
189 | mode_t mode, struct file_operations *fops) | 192 | mode_t mode, const struct file_operations *fops) |
190 | { | 193 | { |
191 | struct proc_dir_entry *res = create_proc_entry(name, mode, proc_net); | 194 | struct proc_dir_entry *res = create_proc_entry(name, mode, proc_net); |
192 | if (res) | 195 | if (res) |