aboutsummaryrefslogtreecommitdiffstats
path: root/fs/pipe.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2006-03-28 04:56:42 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-28 12:16:06 -0500
commit4b6f5d20b04dcbc3d888555522b90ba6d36c4106 (patch)
tree420f271eaef7d3def7d4433b151c3cb6d7a54770 /fs/pipe.c
parent99ac48f54a91d02140c497edc31dc57d4bc5c85d (diff)
[PATCH] Make most file operations structs in fs/ const
This is a conversion to make the various file_operations structs in fs/ const. Basically a regexp job, with a few manual fixups The goal is both to increase correctness (harder to accidentally write to shared datastructures) and reducing the false sharing of cachelines with things that get dirty in .data (while .rodata is nicely read only and thus cache clean) Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/pipe.c')
-rw-r--r--fs/pipe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/pipe.c b/fs/pipe.c
index 4384c9290943..e2f4f1d9ffc2 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -568,7 +568,7 @@ pipe_rdwr_open(struct inode *inode, struct file *filp)
568 * The file_operations structs are not static because they 568 * The file_operations structs are not static because they
569 * are also used in linux/fs/fifo.c to do operations on FIFOs. 569 * are also used in linux/fs/fifo.c to do operations on FIFOs.
570 */ 570 */
571struct file_operations read_fifo_fops = { 571const struct file_operations read_fifo_fops = {
572 .llseek = no_llseek, 572 .llseek = no_llseek,
573 .read = pipe_read, 573 .read = pipe_read,
574 .readv = pipe_readv, 574 .readv = pipe_readv,
@@ -580,7 +580,7 @@ struct file_operations read_fifo_fops = {
580 .fasync = pipe_read_fasync, 580 .fasync = pipe_read_fasync,
581}; 581};
582 582
583struct file_operations write_fifo_fops = { 583const struct file_operations write_fifo_fops = {
584 .llseek = no_llseek, 584 .llseek = no_llseek,
585 .read = bad_pipe_r, 585 .read = bad_pipe_r,
586 .write = pipe_write, 586 .write = pipe_write,
@@ -592,7 +592,7 @@ struct file_operations write_fifo_fops = {
592 .fasync = pipe_write_fasync, 592 .fasync = pipe_write_fasync,
593}; 593};
594 594
595struct file_operations rdwr_fifo_fops = { 595const struct file_operations rdwr_fifo_fops = {
596 .llseek = no_llseek, 596 .llseek = no_llseek,
597 .read = pipe_read, 597 .read = pipe_read,
598 .readv = pipe_readv, 598 .readv = pipe_readv,