aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
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/nfs/dir.c
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/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index d9ba8cb0ee75..f03a770bacb0 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -65,7 +65,7 @@ const struct file_operations nfs_dir_operations = {
65 .fsync = nfs_fsync_dir, 65 .fsync = nfs_fsync_dir,
66}; 66};
67 67
68struct inode_operations nfs_dir_inode_operations = { 68const struct inode_operations nfs_dir_inode_operations = {
69 .create = nfs_create, 69 .create = nfs_create,
70 .lookup = nfs_lookup, 70 .lookup = nfs_lookup,
71 .link = nfs_link, 71 .link = nfs_link,
@@ -81,7 +81,7 @@ struct inode_operations nfs_dir_inode_operations = {
81}; 81};
82 82
83#ifdef CONFIG_NFS_V3 83#ifdef CONFIG_NFS_V3
84struct inode_operations nfs3_dir_inode_operations = { 84const struct inode_operations nfs3_dir_inode_operations = {
85 .create = nfs_create, 85 .create = nfs_create,
86 .lookup = nfs_lookup, 86 .lookup = nfs_lookup,
87 .link = nfs_link, 87 .link = nfs_link,
@@ -104,7 +104,7 @@ struct inode_operations nfs3_dir_inode_operations = {
104#ifdef CONFIG_NFS_V4 104#ifdef CONFIG_NFS_V4
105 105
106static struct dentry *nfs_atomic_lookup(struct inode *, struct dentry *, struct nameidata *); 106static struct dentry *nfs_atomic_lookup(struct inode *, struct dentry *, struct nameidata *);
107struct inode_operations nfs4_dir_inode_operations = { 107const struct inode_operations nfs4_dir_inode_operations = {
108 .create = nfs_create, 108 .create = nfs_create,
109 .lookup = nfs_atomic_lookup, 109 .lookup = nfs_atomic_lookup,
110 .link = nfs_link, 110 .link = nfs_link,