diff options
author | Arjan van de Ven <arjan@infradead.org> | 2006-03-28 04:56:41 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-28 12:16:05 -0500 |
commit | 99ac48f54a91d02140c497edc31dc57d4bc5c85d (patch) | |
tree | 68719391694a6914191bdf73d2071875f7653f6f /include/linux/fs.h | |
parent | ec1b9466cb4f6ae6d950bd67055d9410d1056d2a (diff) |
[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>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 680d913350e7..ef355bc73714 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -496,7 +496,7 @@ struct inode { | |||
496 | struct mutex i_mutex; | 496 | struct mutex i_mutex; |
497 | struct rw_semaphore i_alloc_sem; | 497 | struct rw_semaphore i_alloc_sem; |
498 | struct inode_operations *i_op; | 498 | struct inode_operations *i_op; |
499 | struct file_operations *i_fop; /* former ->i_op->default_file_ops */ | 499 | const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ |
500 | struct super_block *i_sb; | 500 | struct super_block *i_sb; |
501 | struct file_lock *i_flock; | 501 | struct file_lock *i_flock; |
502 | struct address_space *i_mapping; | 502 | struct address_space *i_mapping; |
@@ -636,7 +636,7 @@ struct file { | |||
636 | } f_u; | 636 | } f_u; |
637 | struct dentry *f_dentry; | 637 | struct dentry *f_dentry; |
638 | struct vfsmount *f_vfsmnt; | 638 | struct vfsmount *f_vfsmnt; |
639 | struct file_operations *f_op; | 639 | const struct file_operations *f_op; |
640 | atomic_t f_count; | 640 | atomic_t f_count; |
641 | unsigned int f_flags; | 641 | unsigned int f_flags; |
642 | mode_t f_mode; | 642 | mode_t f_mode; |
@@ -1414,7 +1414,7 @@ extern void bd_release_from_disk(struct block_device *, struct gendisk *); | |||
1414 | extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); | 1414 | extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); |
1415 | extern int register_chrdev_region(dev_t, unsigned, const char *); | 1415 | extern int register_chrdev_region(dev_t, unsigned, const char *); |
1416 | extern int register_chrdev(unsigned int, const char *, | 1416 | extern int register_chrdev(unsigned int, const char *, |
1417 | struct file_operations *); | 1417 | const struct file_operations *); |
1418 | extern int unregister_chrdev(unsigned int, const char *); | 1418 | extern int unregister_chrdev(unsigned int, const char *); |
1419 | extern void unregister_chrdev_region(dev_t, unsigned); | 1419 | extern void unregister_chrdev_region(dev_t, unsigned); |
1420 | extern int chrdev_open(struct inode *, struct file *); | 1420 | extern int chrdev_open(struct inode *, struct file *); |