aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_trie.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:35 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:46 -0500
commit9a32144e9d7b4e21341174b1a83b82a82353be86 (patch)
tree6f08560b341418fc9934f56f6162a95f5b5d8aec /net/ipv4/fib_trie.c
parent00977a59b951207d38380c75f03a36829950265c (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/ipv4/fib_trie.c')
-rw-r--r--net/ipv4/fib_trie.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 004a437bd7b5..c33dca073801 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -2173,7 +2173,7 @@ static int fib_triestat_seq_open(struct inode *inode, struct file *file)
2173 return single_open(file, fib_triestat_seq_show, NULL); 2173 return single_open(file, fib_triestat_seq_show, NULL);
2174} 2174}
2175 2175
2176static struct file_operations fib_triestat_fops = { 2176static const struct file_operations fib_triestat_fops = {
2177 .owner = THIS_MODULE, 2177 .owner = THIS_MODULE,
2178 .open = fib_triestat_seq_open, 2178 .open = fib_triestat_seq_open,
2179 .read = seq_read, 2179 .read = seq_read,
@@ -2364,7 +2364,7 @@ out_kfree:
2364 goto out; 2364 goto out;
2365} 2365}
2366 2366
2367static struct file_operations fib_trie_fops = { 2367static const struct file_operations fib_trie_fops = {
2368 .owner = THIS_MODULE, 2368 .owner = THIS_MODULE,
2369 .open = fib_trie_seq_open, 2369 .open = fib_trie_seq_open,
2370 .read = seq_read, 2370 .read = seq_read,
@@ -2485,7 +2485,7 @@ out_kfree:
2485 goto out; 2485 goto out;
2486} 2486}
2487 2487
2488static struct file_operations fib_route_fops = { 2488static const struct file_operations fib_route_fops = {
2489 .owner = THIS_MODULE, 2489 .owner = THIS_MODULE,
2490 .open = fib_route_seq_open, 2490 .open = fib_route_seq_open,
2491 .read = seq_read, 2491 .read = seq_read,