diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2007-02-12 03:55:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:45 -0500 |
commit | 00977a59b951207d38380c75f03a36829950265c (patch) | |
tree | 26933feafebffca95df02c19df03f5e56aada47e /fs/proc/task_mmu.c | |
parent | d54b1fdb1d9f82e375a299e22bd366aad52d4c34 (diff) |
[PATCH] mark struct file_operations const 6
Many struct file_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/proc/task_mmu.c')
-rw-r--r-- | fs/proc/task_mmu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 55ade0d15621..7445980c8022 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -434,7 +434,7 @@ static int maps_open(struct inode *inode, struct file *file) | |||
434 | return do_maps_open(inode, file, &proc_pid_maps_op); | 434 | return do_maps_open(inode, file, &proc_pid_maps_op); |
435 | } | 435 | } |
436 | 436 | ||
437 | struct file_operations proc_maps_operations = { | 437 | const struct file_operations proc_maps_operations = { |
438 | .open = maps_open, | 438 | .open = maps_open, |
439 | .read = seq_read, | 439 | .read = seq_read, |
440 | .llseek = seq_lseek, | 440 | .llseek = seq_lseek, |
@@ -456,7 +456,7 @@ static int numa_maps_open(struct inode *inode, struct file *file) | |||
456 | return do_maps_open(inode, file, &proc_pid_numa_maps_op); | 456 | return do_maps_open(inode, file, &proc_pid_numa_maps_op); |
457 | } | 457 | } |
458 | 458 | ||
459 | struct file_operations proc_numa_maps_operations = { | 459 | const struct file_operations proc_numa_maps_operations = { |
460 | .open = numa_maps_open, | 460 | .open = numa_maps_open, |
461 | .read = seq_read, | 461 | .read = seq_read, |
462 | .llseek = seq_lseek, | 462 | .llseek = seq_lseek, |
@@ -469,7 +469,7 @@ static int smaps_open(struct inode *inode, struct file *file) | |||
469 | return do_maps_open(inode, file, &proc_pid_smaps_op); | 469 | return do_maps_open(inode, file, &proc_pid_smaps_op); |
470 | } | 470 | } |
471 | 471 | ||
472 | struct file_operations proc_smaps_operations = { | 472 | const struct file_operations proc_smaps_operations = { |
473 | .open = smaps_open, | 473 | .open = smaps_open, |
474 | .read = seq_read, | 474 | .read = seq_read, |
475 | .llseek = seq_lseek, | 475 | .llseek = seq_lseek, |