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/nfsd/nfsctl.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/nfsd/nfsctl.c')
-rw-r--r-- | fs/nfsd/nfsctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index c8960aff0968..3ef017b3b5bd 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c | |||
@@ -134,7 +134,7 @@ static ssize_t nfsctl_transaction_read(struct file *file, char __user *buf, size | |||
134 | return simple_transaction_read(file, buf, size, pos); | 134 | return simple_transaction_read(file, buf, size, pos); |
135 | } | 135 | } |
136 | 136 | ||
137 | static struct file_operations transaction_ops = { | 137 | static const struct file_operations transaction_ops = { |
138 | .write = nfsctl_transaction_write, | 138 | .write = nfsctl_transaction_write, |
139 | .read = nfsctl_transaction_read, | 139 | .read = nfsctl_transaction_read, |
140 | .release = simple_transaction_release, | 140 | .release = simple_transaction_release, |
@@ -146,7 +146,7 @@ static int exports_open(struct inode *inode, struct file *file) | |||
146 | return seq_open(file, &nfs_exports_op); | 146 | return seq_open(file, &nfs_exports_op); |
147 | } | 147 | } |
148 | 148 | ||
149 | static struct file_operations exports_operations = { | 149 | static const struct file_operations exports_operations = { |
150 | .open = exports_open, | 150 | .open = exports_open, |
151 | .read = seq_read, | 151 | .read = seq_read, |
152 | .llseek = seq_lseek, | 152 | .llseek = seq_lseek, |