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/jffs/inode-v23.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/jffs/inode-v23.c')
-rw-r--r-- | fs/jffs/inode-v23.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/jffs/inode-v23.c b/fs/jffs/inode-v23.c index 5a4519e834da..020cc097c539 100644 --- a/fs/jffs/inode-v23.c +++ b/fs/jffs/inode-v23.c | |||
@@ -55,9 +55,9 @@ | |||
55 | static int jffs_remove(struct inode *dir, struct dentry *dentry, int type); | 55 | static int jffs_remove(struct inode *dir, struct dentry *dentry, int type); |
56 | 56 | ||
57 | static struct super_operations jffs_ops; | 57 | static struct super_operations jffs_ops; |
58 | static struct file_operations jffs_file_operations; | 58 | static const struct file_operations jffs_file_operations; |
59 | static struct inode_operations jffs_file_inode_operations; | 59 | static struct inode_operations jffs_file_inode_operations; |
60 | static struct file_operations jffs_dir_operations; | 60 | static const struct file_operations jffs_dir_operations; |
61 | static struct inode_operations jffs_dir_inode_operations; | 61 | static struct inode_operations jffs_dir_inode_operations; |
62 | static struct address_space_operations jffs_address_operations; | 62 | static struct address_space_operations jffs_address_operations; |
63 | 63 | ||
@@ -1629,7 +1629,7 @@ static int jffs_fsync(struct file *f, struct dentry *d, int datasync) | |||
1629 | } | 1629 | } |
1630 | 1630 | ||
1631 | 1631 | ||
1632 | static struct file_operations jffs_file_operations = | 1632 | static const struct file_operations jffs_file_operations = |
1633 | { | 1633 | { |
1634 | .open = generic_file_open, | 1634 | .open = generic_file_open, |
1635 | .llseek = generic_file_llseek, | 1635 | .llseek = generic_file_llseek, |
@@ -1649,7 +1649,7 @@ static struct inode_operations jffs_file_inode_operations = | |||
1649 | }; | 1649 | }; |
1650 | 1650 | ||
1651 | 1651 | ||
1652 | static struct file_operations jffs_dir_operations = | 1652 | static const struct file_operations jffs_dir_operations = |
1653 | { | 1653 | { |
1654 | .readdir = jffs_readdir, | 1654 | .readdir = jffs_readdir, |
1655 | }; | 1655 | }; |