aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:38 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:46 -0500
commit754661f143e70d66eae6c48532ca245aa05dec0e (patch)
treec3ed0f7f96061931e497ed92d2b21294756b4831 /fs/afs
parent9c2e08c592cd357a8330c34def1e8ecfdcf53275 (diff)
[PATCH] mark struct inode_operations const 1
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/afs')
-rw-r--r--fs/afs/dir.c2
-rw-r--r--fs/afs/file.c2
-rw-r--r--fs/afs/internal.h6
-rw-r--r--fs/afs/mntpt.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/fs/afs/dir.c b/fs/afs/dir.c
index 4acd04134055..9908462bcadc 100644
--- a/fs/afs/dir.c
+++ b/fs/afs/dir.c
@@ -37,7 +37,7 @@ const struct file_operations afs_dir_file_operations = {
37 .readdir = afs_dir_readdir, 37 .readdir = afs_dir_readdir,
38}; 38};
39 39
40struct inode_operations afs_dir_inode_operations = { 40const struct inode_operations afs_dir_inode_operations = {
41 .lookup = afs_dir_lookup, 41 .lookup = afs_dir_lookup,
42 .getattr = afs_inode_getattr, 42 .getattr = afs_inode_getattr,
43#if 0 /* TODO */ 43#if 0 /* TODO */
diff --git a/fs/afs/file.c b/fs/afs/file.c
index 2e8c42639eaa..eeff14c3f748 100644
--- a/fs/afs/file.c
+++ b/fs/afs/file.c
@@ -30,7 +30,7 @@ static int afs_file_readpage(struct file *file, struct page *page);
30static void afs_file_invalidatepage(struct page *page, unsigned long offset); 30static void afs_file_invalidatepage(struct page *page, unsigned long offset);
31static int afs_file_releasepage(struct page *page, gfp_t gfp_flags); 31static int afs_file_releasepage(struct page *page, gfp_t gfp_flags);
32 32
33struct inode_operations afs_file_inode_operations = { 33const struct inode_operations afs_file_inode_operations = {
34 .getattr = afs_inode_getattr, 34 .getattr = afs_inode_getattr,
35}; 35};
36 36
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index e88b3b65ae49..5151d5da2c2f 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -63,14 +63,14 @@ extern struct cachefs_index_def afs_cache_cell_index_def;
63/* 63/*
64 * dir.c 64 * dir.c
65 */ 65 */
66extern struct inode_operations afs_dir_inode_operations; 66extern const struct inode_operations afs_dir_inode_operations;
67extern const struct file_operations afs_dir_file_operations; 67extern const struct file_operations afs_dir_file_operations;
68 68
69/* 69/*
70 * file.c 70 * file.c
71 */ 71 */
72extern const struct address_space_operations afs_fs_aops; 72extern const struct address_space_operations afs_fs_aops;
73extern struct inode_operations afs_file_inode_operations; 73extern const struct inode_operations afs_file_inode_operations;
74 74
75#ifdef AFS_CACHING_SUPPORT 75#ifdef AFS_CACHING_SUPPORT
76extern int afs_cache_get_page_cookie(struct page *page, 76extern int afs_cache_get_page_cookie(struct page *page,
@@ -104,7 +104,7 @@ extern struct cachefs_netfs afs_cache_netfs;
104/* 104/*
105 * mntpt.c 105 * mntpt.c
106 */ 106 */
107extern struct inode_operations afs_mntpt_inode_operations; 107extern const struct inode_operations afs_mntpt_inode_operations;
108extern const struct file_operations afs_mntpt_file_operations; 108extern const struct file_operations afs_mntpt_file_operations;
109extern struct afs_timer afs_mntpt_expiry_timer; 109extern struct afs_timer afs_mntpt_expiry_timer;
110extern struct afs_timer_ops afs_mntpt_expiry_timer_ops; 110extern struct afs_timer_ops afs_mntpt_expiry_timer_ops;
diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c
index 8f74e8450826..fdf23b2a2112 100644
--- a/fs/afs/mntpt.c
+++ b/fs/afs/mntpt.c
@@ -36,7 +36,7 @@ const struct file_operations afs_mntpt_file_operations = {
36 .open = afs_mntpt_open, 36 .open = afs_mntpt_open,
37}; 37};
38 38
39struct inode_operations afs_mntpt_inode_operations = { 39const struct inode_operations afs_mntpt_inode_operations = {
40 .lookup = afs_mntpt_lookup, 40 .lookup = afs_mntpt_lookup,
41 .follow_link = afs_mntpt_follow_link, 41 .follow_link = afs_mntpt_follow_link,
42 .readlink = page_readlink, 42 .readlink = page_readlink,