[PATCH] mark f_ops const in the inode
Mark the f_ops members of inodes as const, as well as fix the ripple-through this causes by places that copy this f_ops and then "do stuff" with it. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
ec1b9466cb
commit
99ac48f54a
@@ -560,7 +560,7 @@ static void proc_kill_inodes(struct proc_dir_entry *de)
|
||||
struct file * filp = list_entry(p, struct file, f_u.fu_list);
|
||||
struct dentry * dentry = filp->f_dentry;
|
||||
struct inode * inode;
|
||||
struct file_operations *fops;
|
||||
const struct file_operations *fops;
|
||||
|
||||
if (dentry->d_op != &proc_dentry_operations)
|
||||
continue;
|
||||
|
@@ -30,7 +30,7 @@ do { \
|
||||
|
||||
#endif
|
||||
|
||||
extern void create_seq_entry(char *name, mode_t mode, struct file_operations *f);
|
||||
extern void create_seq_entry(char *name, mode_t mode, const struct file_operations *f);
|
||||
extern int proc_exe_link(struct inode *, struct dentry **, struct vfsmount **);
|
||||
extern int proc_tid_stat(struct task_struct *, char *);
|
||||
extern int proc_tgid_stat(struct task_struct *, char *);
|
||||
|
@@ -731,7 +731,7 @@ static struct file_operations proc_sysrq_trigger_operations = {
|
||||
|
||||
struct proc_dir_entry *proc_root_kcore;
|
||||
|
||||
void create_seq_entry(char *name, mode_t mode, struct file_operations *f)
|
||||
void create_seq_entry(char *name, mode_t mode, const struct file_operations *f)
|
||||
{
|
||||
struct proc_dir_entry *entry;
|
||||
entry = create_proc_entry(name, mode, NULL);
|
||||
|
Reference in New Issue
Block a user