diff options
author | Arjan van de Ven <arjan@infradead.org> | 2006-03-28 04:56:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-28 12:16:06 -0500 |
commit | 4b6f5d20b04dcbc3d888555522b90ba6d36c4106 (patch) | |
tree | 420f271eaef7d3def7d4433b151c3cb6d7a54770 /fs/cifs/cifsfs.c | |
parent | 99ac48f54a91d02140c497edc31dc57d4bc5c85d (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/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 6b99b51d6694..4bbc544857bc 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -583,7 +583,7 @@ struct inode_operations cifs_symlink_inode_ops = { | |||
583 | #endif | 583 | #endif |
584 | }; | 584 | }; |
585 | 585 | ||
586 | struct file_operations cifs_file_ops = { | 586 | const struct file_operations cifs_file_ops = { |
587 | .read = do_sync_read, | 587 | .read = do_sync_read, |
588 | .write = do_sync_write, | 588 | .write = do_sync_write, |
589 | .readv = generic_file_readv, | 589 | .readv = generic_file_readv, |
@@ -607,7 +607,7 @@ struct file_operations cifs_file_ops = { | |||
607 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | 607 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ |
608 | }; | 608 | }; |
609 | 609 | ||
610 | struct file_operations cifs_file_direct_ops = { | 610 | const struct file_operations cifs_file_direct_ops = { |
611 | /* no mmap, no aio, no readv - | 611 | /* no mmap, no aio, no readv - |
612 | BB reevaluate whether they can be done with directio, no cache */ | 612 | BB reevaluate whether they can be done with directio, no cache */ |
613 | .read = cifs_user_read, | 613 | .read = cifs_user_read, |
@@ -626,7 +626,7 @@ struct file_operations cifs_file_direct_ops = { | |||
626 | .dir_notify = cifs_dir_notify, | 626 | .dir_notify = cifs_dir_notify, |
627 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | 627 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ |
628 | }; | 628 | }; |
629 | struct file_operations cifs_file_nobrl_ops = { | 629 | const struct file_operations cifs_file_nobrl_ops = { |
630 | .read = do_sync_read, | 630 | .read = do_sync_read, |
631 | .write = do_sync_write, | 631 | .write = do_sync_write, |
632 | .readv = generic_file_readv, | 632 | .readv = generic_file_readv, |
@@ -649,7 +649,7 @@ struct file_operations cifs_file_nobrl_ops = { | |||
649 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | 649 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ |
650 | }; | 650 | }; |
651 | 651 | ||
652 | struct file_operations cifs_file_direct_nobrl_ops = { | 652 | const struct file_operations cifs_file_direct_nobrl_ops = { |
653 | /* no mmap, no aio, no readv - | 653 | /* no mmap, no aio, no readv - |
654 | BB reevaluate whether they can be done with directio, no cache */ | 654 | BB reevaluate whether they can be done with directio, no cache */ |
655 | .read = cifs_user_read, | 655 | .read = cifs_user_read, |
@@ -668,7 +668,7 @@ struct file_operations cifs_file_direct_nobrl_ops = { | |||
668 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | 668 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ |
669 | }; | 669 | }; |
670 | 670 | ||
671 | struct file_operations cifs_dir_ops = { | 671 | const struct file_operations cifs_dir_ops = { |
672 | .readdir = cifs_readdir, | 672 | .readdir = cifs_readdir, |
673 | .release = cifs_closedir, | 673 | .release = cifs_closedir, |
674 | .read = generic_read_dir, | 674 | .read = generic_read_dir, |