aboutsummaryrefslogtreecommitdiffstats
path: root/fs/inode.c
diff options
context:
space:
mode:
authorJosef 'Jeff' Sipek <jsipek@cs.sunysb.edu>2007-02-12 03:55:41 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:47 -0500
commitee9b6d61a2a43c5952eb43283f8db284a4e70b8a (patch)
treeafb0340e79d3e9d14f39df20e165ce2efe941b18 /fs/inode.c
parentc5ef1c42c51b1b5b4a401a6517bdda30933ddbaf (diff)
[PATCH] Mark struct super_operations const
This patch is inspired by Arjan's "Patch series to mark struct file_operations and struct inode_operations const". Compile tested with gcc & sparse. Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/inode.c')
-rw-r--r--fs/inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/inode.c b/fs/inode.c
index 5e32432a7608..5abb097ab1b0 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1000,7 +1000,7 @@ EXPORT_SYMBOL(remove_inode_hash);
1000 */ 1000 */
1001void generic_delete_inode(struct inode *inode) 1001void generic_delete_inode(struct inode *inode)
1002{ 1002{
1003 struct super_operations *op = inode->i_sb->s_op; 1003 const struct super_operations *op = inode->i_sb->s_op;
1004 1004
1005 list_del_init(&inode->i_list); 1005 list_del_init(&inode->i_list);
1006 list_del_init(&inode->i_sb_list); 1006 list_del_init(&inode->i_sb_list);
@@ -1093,7 +1093,7 @@ EXPORT_SYMBOL_GPL(generic_drop_inode);
1093 */ 1093 */
1094static inline void iput_final(struct inode *inode) 1094static inline void iput_final(struct inode *inode)
1095{ 1095{
1096 struct super_operations *op = inode->i_sb->s_op; 1096 const struct super_operations *op = inode->i_sb->s_op;
1097 void (*drop)(struct inode *) = generic_drop_inode; 1097 void (*drop)(struct inode *) = generic_drop_inode;
1098 1098
1099 if (op && op->drop_inode) 1099 if (op && op->drop_inode)
@@ -1113,7 +1113,7 @@ static inline void iput_final(struct inode *inode)
1113void iput(struct inode *inode) 1113void iput(struct inode *inode)
1114{ 1114{
1115 if (inode) { 1115 if (inode) {
1116 struct super_operations *op = inode->i_sb->s_op; 1116 const struct super_operations *op = inode->i_sb->s_op;
1117 1117
1118 BUG_ON(inode->i_state == I_CLEAR); 1118 BUG_ON(inode->i_state == I_CLEAR);
1119 1119