diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2007-02-12 03:55:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:46 -0500 |
commit | 9c2e08c592cd357a8330c34def1e8ecfdcf53275 (patch) | |
tree | 62e7449e43bb502f2e9630ab41832ceccd9a0f65 /security/keys | |
parent | da7071d7e32d15149cc513f096a3638097b66387 (diff) |
[PATCH] mark struct file_operations const 9
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 'security/keys')
-rw-r--r-- | security/keys/proc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/keys/proc.c b/security/keys/proc.c index 686a9ee0c5de..3e0d0a6e224f 100644 --- a/security/keys/proc.c +++ b/security/keys/proc.c | |||
@@ -33,7 +33,7 @@ static struct seq_operations proc_keys_ops = { | |||
33 | .show = proc_keys_show, | 33 | .show = proc_keys_show, |
34 | }; | 34 | }; |
35 | 35 | ||
36 | static struct file_operations proc_keys_fops = { | 36 | static const struct file_operations proc_keys_fops = { |
37 | .open = proc_keys_open, | 37 | .open = proc_keys_open, |
38 | .read = seq_read, | 38 | .read = seq_read, |
39 | .llseek = seq_lseek, | 39 | .llseek = seq_lseek, |
@@ -54,7 +54,7 @@ static struct seq_operations proc_key_users_ops = { | |||
54 | .show = proc_key_users_show, | 54 | .show = proc_key_users_show, |
55 | }; | 55 | }; |
56 | 56 | ||
57 | static struct file_operations proc_key_users_fops = { | 57 | static const struct file_operations proc_key_users_fops = { |
58 | .open = proc_key_users_open, | 58 | .open = proc_key_users_open, |
59 | .read = seq_read, | 59 | .read = seq_read, |
60 | .llseek = seq_lseek, | 60 | .llseek = seq_lseek, |