aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6
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/xfs/linux-2.6
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/xfs/linux-2.6')
-rw-r--r--fs/xfs/linux-2.6/xfs_file.c6
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c
index 185567a6a561..85997b1205f5 100644
--- a/fs/xfs/linux-2.6/xfs_file.c
+++ b/fs/xfs/linux-2.6/xfs_file.c
@@ -528,7 +528,7 @@ open_exec_out:
528} 528}
529#endif /* HAVE_FOP_OPEN_EXEC */ 529#endif /* HAVE_FOP_OPEN_EXEC */
530 530
531struct file_operations xfs_file_operations = { 531const struct file_operations xfs_file_operations = {
532 .llseek = generic_file_llseek, 532 .llseek = generic_file_llseek,
533 .read = do_sync_read, 533 .read = do_sync_read,
534 .write = do_sync_write, 534 .write = do_sync_write,
@@ -550,7 +550,7 @@ struct file_operations xfs_file_operations = {
550#endif 550#endif
551}; 551};
552 552
553struct file_operations xfs_invis_file_operations = { 553const struct file_operations xfs_invis_file_operations = {
554 .llseek = generic_file_llseek, 554 .llseek = generic_file_llseek,
555 .read = do_sync_read, 555 .read = do_sync_read,
556 .write = do_sync_write, 556 .write = do_sync_write,
@@ -570,7 +570,7 @@ struct file_operations xfs_invis_file_operations = {
570}; 570};
571 571
572 572
573struct file_operations xfs_dir_file_operations = { 573const struct file_operations xfs_dir_file_operations = {
574 .read = generic_read_dir, 574 .read = generic_read_dir,
575 .readdir = xfs_file_readdir, 575 .readdir = xfs_file_readdir,
576 .unlocked_ioctl = xfs_file_ioctl, 576 .unlocked_ioctl = xfs_file_ioctl,
diff --git a/fs/xfs/linux-2.6/xfs_iops.h b/fs/xfs/linux-2.6/xfs_iops.h
index a8417d7af5f9..ad6173da5678 100644
--- a/fs/xfs/linux-2.6/xfs_iops.h
+++ b/fs/xfs/linux-2.6/xfs_iops.h
@@ -22,9 +22,9 @@ extern struct inode_operations xfs_inode_operations;
22extern struct inode_operations xfs_dir_inode_operations; 22extern struct inode_operations xfs_dir_inode_operations;
23extern struct inode_operations xfs_symlink_inode_operations; 23extern struct inode_operations xfs_symlink_inode_operations;
24 24
25extern struct file_operations xfs_file_operations; 25extern const struct file_operations xfs_file_operations;
26extern struct file_operations xfs_dir_file_operations; 26extern const struct file_operations xfs_dir_file_operations;
27extern struct file_operations xfs_invis_file_operations; 27extern const struct file_operations xfs_invis_file_operations;
28 28
29extern int xfs_ioctl(struct bhv_desc *, struct inode *, struct file *, 29extern int xfs_ioctl(struct bhv_desc *, struct inode *, struct file *,
30 int, unsigned int, void __user *); 30 int, unsigned int, void __user *);