diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2007-02-12 03:55:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:46 -0500 |
commit | 92e1d5be91a0e3ffa5c4697eeb09b2aa22792122 (patch) | |
tree | 4eb22a9f6c38e9f4cc2a5100cd6659b0af08b7ae /fs/hugetlbfs | |
parent | 754661f143e70d66eae6c48532ca245aa05dec0e (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')
-rw-r--r-- | fs/hugetlbfs/inode.c | 8 |
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 @@ | |||
36 | static struct super_operations hugetlbfs_ops; | 36 | static struct super_operations hugetlbfs_ops; |
37 | static const struct address_space_operations hugetlbfs_aops; | 37 | static const struct address_space_operations hugetlbfs_aops; |
38 | const struct file_operations hugetlbfs_file_operations; | 38 | const struct file_operations hugetlbfs_file_operations; |
39 | static struct inode_operations hugetlbfs_dir_inode_operations; | 39 | static const struct inode_operations hugetlbfs_dir_inode_operations; |
40 | static struct inode_operations hugetlbfs_inode_operations; | 40 | static const struct inode_operations hugetlbfs_inode_operations; |
41 | 41 | ||
42 | static struct backing_dev_info hugetlbfs_backing_dev_info = { | 42 | static 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 | ||
566 | static struct inode_operations hugetlbfs_dir_inode_operations = { | 566 | static 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 | ||
579 | static struct inode_operations hugetlbfs_inode_operations = { | 579 | static const struct inode_operations hugetlbfs_inode_operations = { |
580 | .setattr = hugetlbfs_setattr, | 580 | .setattr = hugetlbfs_setattr, |
581 | }; | 581 | }; |
582 | 582 | ||