aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hugetlbfs/inode.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/hugetlbfs/inode.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/hugetlbfs/inode.c')
-rw-r--r--fs/hugetlbfs/inode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index e6bd553fdc4c..26ba81fc7fab 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -36,8 +36,8 @@
36static struct super_operations hugetlbfs_ops; 36static struct super_operations hugetlbfs_ops;
37static const struct address_space_operations hugetlbfs_aops; 37static const struct address_space_operations hugetlbfs_aops;
38const struct file_operations hugetlbfs_file_operations; 38const struct file_operations hugetlbfs_file_operations;
39static struct inode_operations hugetlbfs_dir_inode_operations; 39static const struct inode_operations hugetlbfs_dir_inode_operations;
40static struct inode_operations hugetlbfs_inode_operations; 40static const struct inode_operations hugetlbfs_inode_operations;
41 41
42static struct backing_dev_info hugetlbfs_backing_dev_info = { 42static struct backing_dev_info hugetlbfs_backing_dev_info = {
43 .ra_pages = 0, /* No readahead */ 43 .ra_pages = 0, /* No readahead */
@@ -563,7 +563,7 @@ const struct file_operations hugetlbfs_file_operations = {
563 .get_unmapped_area = hugetlb_get_unmapped_area, 563 .get_unmapped_area = hugetlb_get_unmapped_area,
564}; 564};
565 565
566static struct inode_operations hugetlbfs_dir_inode_operations = { 566static const struct inode_operations hugetlbfs_dir_inode_operations = {
567 .create = hugetlbfs_create, 567 .create = hugetlbfs_create,
568 .lookup = simple_lookup, 568 .lookup = simple_lookup,
569 .link = simple_link, 569 .link = simple_link,
@@ -576,7 +576,7 @@ static struct inode_operations hugetlbfs_dir_inode_operations = {
576 .setattr = hugetlbfs_setattr, 576 .setattr = hugetlbfs_setattr,
577}; 577};
578 578
579static struct inode_operations hugetlbfs_inode_operations = { 579static const struct inode_operations hugetlbfs_inode_operations = {
580 .setattr = hugetlbfs_setattr, 580 .setattr = hugetlbfs_setattr,
581}; 581};
582 582