diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2009-09-27 14:29:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-27 14:39:25 -0400 |
commit | f0f37e2f77731b3473fa6bd5ee53255d9a9cdb40 (patch) | |
tree | 3c26d3ed1a453156e9c208ccb5567a8954dba064 /mm | |
parent | 6f5071020d5ec89b5d095aa488db604adb921aec (diff) |
const: mark struct vm_struct_operations
* mark struct vm_area_struct::vm_ops as const
* mark vm_ops in AGP code
But leave TTM code alone, something is fishy there with global vm_ops
being used.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/filemap.c | 2 | ||||
-rw-r--r-- | mm/filemap_xip.c | 2 | ||||
-rw-r--r-- | mm/hugetlb.c | 2 | ||||
-rw-r--r-- | mm/mmap.c | 2 | ||||
-rw-r--r-- | mm/nommu.c | 2 | ||||
-rw-r--r-- | mm/shmem.c | 4 |
6 files changed, 7 insertions, 7 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 6c84e598b4a9..ef169f37156d 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -1611,7 +1611,7 @@ page_not_uptodate: | |||
1611 | } | 1611 | } |
1612 | EXPORT_SYMBOL(filemap_fault); | 1612 | EXPORT_SYMBOL(filemap_fault); |
1613 | 1613 | ||
1614 | struct vm_operations_struct generic_file_vm_ops = { | 1614 | const struct vm_operations_struct generic_file_vm_ops = { |
1615 | .fault = filemap_fault, | 1615 | .fault = filemap_fault, |
1616 | }; | 1616 | }; |
1617 | 1617 | ||
diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c index 427dfe3ce78c..1888b2d71bb8 100644 --- a/mm/filemap_xip.c +++ b/mm/filemap_xip.c | |||
@@ -296,7 +296,7 @@ out: | |||
296 | } | 296 | } |
297 | } | 297 | } |
298 | 298 | ||
299 | static struct vm_operations_struct xip_file_vm_ops = { | 299 | static const struct vm_operations_struct xip_file_vm_ops = { |
300 | .fault = xip_file_fault, | 300 | .fault = xip_file_fault, |
301 | }; | 301 | }; |
302 | 302 | ||
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 6f048fcc749c..5d7601b02874 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -1721,7 +1721,7 @@ static int hugetlb_vm_op_fault(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
1721 | return 0; | 1721 | return 0; |
1722 | } | 1722 | } |
1723 | 1723 | ||
1724 | struct vm_operations_struct hugetlb_vm_ops = { | 1724 | const struct vm_operations_struct hugetlb_vm_ops = { |
1725 | .fault = hugetlb_vm_op_fault, | 1725 | .fault = hugetlb_vm_op_fault, |
1726 | .open = hugetlb_vm_op_open, | 1726 | .open = hugetlb_vm_op_open, |
1727 | .close = hugetlb_vm_op_close, | 1727 | .close = hugetlb_vm_op_close, |
@@ -2282,7 +2282,7 @@ static void special_mapping_close(struct vm_area_struct *vma) | |||
2282 | { | 2282 | { |
2283 | } | 2283 | } |
2284 | 2284 | ||
2285 | static struct vm_operations_struct special_mapping_vmops = { | 2285 | static const struct vm_operations_struct special_mapping_vmops = { |
2286 | .close = special_mapping_close, | 2286 | .close = special_mapping_close, |
2287 | .fault = special_mapping_fault, | 2287 | .fault = special_mapping_fault, |
2288 | }; | 2288 | }; |
diff --git a/mm/nommu.c b/mm/nommu.c index c73aa4753d79..5189b5aed8c0 100644 --- a/mm/nommu.c +++ b/mm/nommu.c | |||
@@ -79,7 +79,7 @@ static struct kmem_cache *vm_region_jar; | |||
79 | struct rb_root nommu_region_tree = RB_ROOT; | 79 | struct rb_root nommu_region_tree = RB_ROOT; |
80 | DECLARE_RWSEM(nommu_region_sem); | 80 | DECLARE_RWSEM(nommu_region_sem); |
81 | 81 | ||
82 | struct vm_operations_struct generic_file_vm_ops = { | 82 | const struct vm_operations_struct generic_file_vm_ops = { |
83 | }; | 83 | }; |
84 | 84 | ||
85 | /* | 85 | /* |
diff --git a/mm/shmem.c b/mm/shmem.c index ccf446a9faa1..356dd99566ec 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -218,7 +218,7 @@ static const struct file_operations shmem_file_operations; | |||
218 | static const struct inode_operations shmem_inode_operations; | 218 | static const struct inode_operations shmem_inode_operations; |
219 | static const struct inode_operations shmem_dir_inode_operations; | 219 | static const struct inode_operations shmem_dir_inode_operations; |
220 | static const struct inode_operations shmem_special_inode_operations; | 220 | static const struct inode_operations shmem_special_inode_operations; |
221 | static struct vm_operations_struct shmem_vm_ops; | 221 | static const struct vm_operations_struct shmem_vm_ops; |
222 | 222 | ||
223 | static struct backing_dev_info shmem_backing_dev_info __read_mostly = { | 223 | static struct backing_dev_info shmem_backing_dev_info __read_mostly = { |
224 | .ra_pages = 0, /* No readahead */ | 224 | .ra_pages = 0, /* No readahead */ |
@@ -2498,7 +2498,7 @@ static const struct super_operations shmem_ops = { | |||
2498 | .put_super = shmem_put_super, | 2498 | .put_super = shmem_put_super, |
2499 | }; | 2499 | }; |
2500 | 2500 | ||
2501 | static struct vm_operations_struct shmem_vm_ops = { | 2501 | static const struct vm_operations_struct shmem_vm_ops = { |
2502 | .fault = shmem_fault, | 2502 | .fault = shmem_fault, |
2503 | #ifdef CONFIG_NUMA | 2503 | #ifdef CONFIG_NUMA |
2504 | .set_policy = shmem_set_policy, | 2504 | .set_policy = shmem_set_policy, |