[PATCH] mark f_ops const in the inode
[cascardo/linux.git] / include / linux / proc_fs.h
index aa6322d..6d03d02 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/config.h>
 #include <linux/slab.h>
 #include <linux/fs.h>
+#include <linux/spinlock.h>
 #include <asm/atomic.h>
 
 /*
@@ -55,9 +56,9 @@ struct proc_dir_entry {
        nlink_t nlink;
        uid_t uid;
        gid_t gid;
-       unsigned long size;
+       loff_t size;
        struct inode_operations * proc_iops;
-       struct file_operations * proc_fops;
+       const struct file_operations * proc_fops;
        get_info_t *get_info;
        struct module *owner;
        struct proc_dir_entry *next, *parent, *subdir;
@@ -92,6 +93,8 @@ 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);
 
@@ -186,7 +189,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, struct file_operations *fops)
+       mode_t mode, const struct file_operations *fops)
 {
        struct proc_dir_entry *res = create_proc_entry(name, mode, proc_net);
        if (res)