aboutsummaryrefslogtreecommitdiffstats
path: root/net/x25
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:36 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:46 -0500
commitda7071d7e32d15149cc513f096a3638097b66387 (patch)
treef56fb200090ad55b2e2a72c379b1eeea29795670 /net/x25
parent9a32144e9d7b4e21341174b1a83b82a82353be86 (diff)
[PATCH] mark struct file_operations const 8
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/x25')
-rw-r--r--net/x25/x25_proc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/x25/x25_proc.c b/net/x25/x25_proc.c
index 3c9f1ba56221..96001f0c64fc 100644
--- a/net/x25/x25_proc.c
+++ b/net/x25/x25_proc.c
@@ -270,7 +270,7 @@ static int x25_seq_forward_open(struct inode *inode, struct file *file)
270 return seq_open(file, &x25_seq_forward_ops); 270 return seq_open(file, &x25_seq_forward_ops);
271} 271}
272 272
273static struct file_operations x25_seq_socket_fops = { 273static const struct file_operations x25_seq_socket_fops = {
274 .owner = THIS_MODULE, 274 .owner = THIS_MODULE,
275 .open = x25_seq_socket_open, 275 .open = x25_seq_socket_open,
276 .read = seq_read, 276 .read = seq_read,
@@ -278,7 +278,7 @@ static struct file_operations x25_seq_socket_fops = {
278 .release = seq_release, 278 .release = seq_release,
279}; 279};
280 280
281static struct file_operations x25_seq_route_fops = { 281static const struct file_operations x25_seq_route_fops = {
282 .owner = THIS_MODULE, 282 .owner = THIS_MODULE,
283 .open = x25_seq_route_open, 283 .open = x25_seq_route_open,
284 .read = seq_read, 284 .read = seq_read,