diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2007-02-12 03:55:35 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:46 -0500 |
commit | 9a32144e9d7b4e21341174b1a83b82a82353be86 (patch) | |
tree | 6f08560b341418fc9934f56f6162a95f5b5d8aec /net/appletalk | |
parent | 00977a59b951207d38380c75f03a36829950265c (diff) |
[PATCH] mark struct file_operations const 7
Many struct file_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/appletalk')
-rw-r--r-- | net/appletalk/aarp.c | 2 | ||||
-rw-r--r-- | net/appletalk/atalk_proc.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c index 27e845d260a9..d89d62f3702f 100644 --- a/net/appletalk/aarp.c +++ b/net/appletalk/aarp.c | |||
@@ -1048,7 +1048,7 @@ out_kfree: | |||
1048 | goto out; | 1048 | goto out; |
1049 | } | 1049 | } |
1050 | 1050 | ||
1051 | struct file_operations atalk_seq_arp_fops = { | 1051 | const struct file_operations atalk_seq_arp_fops = { |
1052 | .owner = THIS_MODULE, | 1052 | .owner = THIS_MODULE, |
1053 | .open = aarp_seq_open, | 1053 | .open = aarp_seq_open, |
1054 | .read = seq_read, | 1054 | .read = seq_read, |
diff --git a/net/appletalk/atalk_proc.c b/net/appletalk/atalk_proc.c index bc3015f277ba..57ff8122b5c5 100644 --- a/net/appletalk/atalk_proc.c +++ b/net/appletalk/atalk_proc.c | |||
@@ -240,7 +240,7 @@ static int atalk_seq_socket_open(struct inode *inode, struct file *file) | |||
240 | return seq_open(file, &atalk_seq_socket_ops); | 240 | return seq_open(file, &atalk_seq_socket_ops); |
241 | } | 241 | } |
242 | 242 | ||
243 | static struct file_operations atalk_seq_interface_fops = { | 243 | static const struct file_operations atalk_seq_interface_fops = { |
244 | .owner = THIS_MODULE, | 244 | .owner = THIS_MODULE, |
245 | .open = atalk_seq_interface_open, | 245 | .open = atalk_seq_interface_open, |
246 | .read = seq_read, | 246 | .read = seq_read, |
@@ -248,7 +248,7 @@ static struct file_operations atalk_seq_interface_fops = { | |||
248 | .release = seq_release, | 248 | .release = seq_release, |
249 | }; | 249 | }; |
250 | 250 | ||
251 | static struct file_operations atalk_seq_route_fops = { | 251 | static const struct file_operations atalk_seq_route_fops = { |
252 | .owner = THIS_MODULE, | 252 | .owner = THIS_MODULE, |
253 | .open = atalk_seq_route_open, | 253 | .open = atalk_seq_route_open, |
254 | .read = seq_read, | 254 | .read = seq_read, |
@@ -256,7 +256,7 @@ static struct file_operations atalk_seq_route_fops = { | |||
256 | .release = seq_release, | 256 | .release = seq_release, |
257 | }; | 257 | }; |
258 | 258 | ||
259 | static struct file_operations atalk_seq_socket_fops = { | 259 | static const struct file_operations atalk_seq_socket_fops = { |
260 | .owner = THIS_MODULE, | 260 | .owner = THIS_MODULE, |
261 | .open = atalk_seq_socket_open, | 261 | .open = atalk_seq_socket_open, |
262 | .read = seq_read, | 262 | .read = seq_read, |