aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:39 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:46 -0500
commit92e1d5be91a0e3ffa5c4697eeb09b2aa22792122 (patch)
tree4eb22a9f6c38e9f4cc2a5100cd6659b0af08b7ae /fs/gfs2
parent754661f143e70d66eae6c48532ca245aa05dec0e (diff)
[PATCH] mark struct inode_operations const 2
Many struct inode_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/ops_inode.c8
-rw-r--r--fs/gfs2/ops_inode.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c
index f40a84807d75..60f47bf2e8e8 100644
--- a/fs/gfs2/ops_inode.c
+++ b/fs/gfs2/ops_inode.c
@@ -1115,7 +1115,7 @@ static int gfs2_removexattr(struct dentry *dentry, const char *name)
1115 return gfs2_ea_remove(GFS2_I(dentry->d_inode), &er); 1115 return gfs2_ea_remove(GFS2_I(dentry->d_inode), &er);
1116} 1116}
1117 1117
1118struct inode_operations gfs2_file_iops = { 1118const struct inode_operations gfs2_file_iops = {
1119 .permission = gfs2_permission, 1119 .permission = gfs2_permission,
1120 .setattr = gfs2_setattr, 1120 .setattr = gfs2_setattr,
1121 .getattr = gfs2_getattr, 1121 .getattr = gfs2_getattr,
@@ -1125,7 +1125,7 @@ struct inode_operations gfs2_file_iops = {
1125 .removexattr = gfs2_removexattr, 1125 .removexattr = gfs2_removexattr,
1126}; 1126};
1127 1127
1128struct inode_operations gfs2_dev_iops = { 1128const struct inode_operations gfs2_dev_iops = {
1129 .permission = gfs2_permission, 1129 .permission = gfs2_permission,
1130 .setattr = gfs2_setattr, 1130 .setattr = gfs2_setattr,
1131 .getattr = gfs2_getattr, 1131 .getattr = gfs2_getattr,
@@ -1135,7 +1135,7 @@ struct inode_operations gfs2_dev_iops = {
1135 .removexattr = gfs2_removexattr, 1135 .removexattr = gfs2_removexattr,
1136}; 1136};
1137 1137
1138struct inode_operations gfs2_dir_iops = { 1138const struct inode_operations gfs2_dir_iops = {
1139 .create = gfs2_create, 1139 .create = gfs2_create,
1140 .lookup = gfs2_lookup, 1140 .lookup = gfs2_lookup,
1141 .link = gfs2_link, 1141 .link = gfs2_link,
@@ -1154,7 +1154,7 @@ struct inode_operations gfs2_dir_iops = {
1154 .removexattr = gfs2_removexattr, 1154 .removexattr = gfs2_removexattr,
1155}; 1155};
1156 1156
1157struct inode_operations gfs2_symlink_iops = { 1157const struct inode_operations gfs2_symlink_iops = {
1158 .readlink = gfs2_readlink, 1158 .readlink = gfs2_readlink,
1159 .follow_link = gfs2_follow_link, 1159 .follow_link = gfs2_follow_link,
1160 .permission = gfs2_permission, 1160 .permission = gfs2_permission,
diff --git a/fs/gfs2/ops_inode.h b/fs/gfs2/ops_inode.h
index b15acb4fd34c..34f0caac1a03 100644
--- a/fs/gfs2/ops_inode.h
+++ b/fs/gfs2/ops_inode.h
@@ -12,9 +12,9 @@
12 12
13#include <linux/fs.h> 13#include <linux/fs.h>
14 14
15extern struct inode_operations gfs2_file_iops; 15extern const struct inode_operations gfs2_file_iops;
16extern struct inode_operations gfs2_dir_iops; 16extern const struct inode_operations gfs2_dir_iops;
17extern struct inode_operations gfs2_symlink_iops; 17extern const struct inode_operations gfs2_symlink_iops;
18extern struct inode_operations gfs2_dev_iops; 18extern const struct inode_operations gfs2_dev_iops;
19 19
20#endif /* __OPS_INODE_DOT_H__ */ 20#endif /* __OPS_INODE_DOT_H__ */