aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/proc.c
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/sctp/proc.c
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/sctp/proc.c')
-rw-r--r--net/sctp/proc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index e93fc1cc430a..2f12bf2d8d3c 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -114,7 +114,7 @@ static int sctp_snmp_seq_open(struct inode *inode, struct file *file)
114 return single_open(file, sctp_snmp_seq_show, NULL); 114 return single_open(file, sctp_snmp_seq_show, NULL);
115} 115}
116 116
117static struct file_operations sctp_snmp_seq_fops = { 117static const struct file_operations sctp_snmp_seq_fops = {
118 .owner = THIS_MODULE, 118 .owner = THIS_MODULE,
119 .open = sctp_snmp_seq_open, 119 .open = sctp_snmp_seq_open,
120 .read = seq_read, 120 .read = seq_read,
@@ -264,7 +264,7 @@ static int sctp_eps_seq_open(struct inode *inode, struct file *file)
264 return seq_open(file, &sctp_eps_ops); 264 return seq_open(file, &sctp_eps_ops);
265} 265}
266 266
267static struct file_operations sctp_eps_seq_fops = { 267static const struct file_operations sctp_eps_seq_fops = {
268 .open = sctp_eps_seq_open, 268 .open = sctp_eps_seq_open,
269 .read = seq_read, 269 .read = seq_read,
270 .llseek = seq_lseek, 270 .llseek = seq_lseek,
@@ -374,7 +374,7 @@ static int sctp_assocs_seq_open(struct inode *inode, struct file *file)
374 return seq_open(file, &sctp_assoc_ops); 374 return seq_open(file, &sctp_assoc_ops);
375} 375}
376 376
377static struct file_operations sctp_assocs_seq_fops = { 377static const struct file_operations sctp_assocs_seq_fops = {
378 .open = sctp_assocs_seq_open, 378 .open = sctp_assocs_seq_open,
379 .read = seq_read, 379 .read = seq_read,
380 .llseek = seq_lseek, 380 .llseek = seq_lseek,