diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2007-02-12 03:55:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:46 -0500 |
commit | c5ef1c42c51b1b5b4a401a6517bdda30933ddbaf (patch) | |
tree | e1a9804a8af427f700aaba4b386cf8679b317e83 /fs/smbfs/dir.c | |
parent | 92e1d5be91a0e3ffa5c4697eeb09b2aa22792122 (diff) |
[PATCH] mark struct inode_operations const 3
Many struct inode_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 'fs/smbfs/dir.c')
-rw-r--r-- | fs/smbfs/dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/smbfs/dir.c b/fs/smbfs/dir.c index b1e58d1ac9ca..50136b1a3eca 100644 --- a/fs/smbfs/dir.c +++ b/fs/smbfs/dir.c | |||
@@ -42,7 +42,7 @@ const struct file_operations smb_dir_operations = | |||
42 | .open = smb_dir_open, | 42 | .open = smb_dir_open, |
43 | }; | 43 | }; |
44 | 44 | ||
45 | struct inode_operations smb_dir_inode_operations = | 45 | const struct inode_operations smb_dir_inode_operations = |
46 | { | 46 | { |
47 | .create = smb_create, | 47 | .create = smb_create, |
48 | .lookup = smb_lookup, | 48 | .lookup = smb_lookup, |
@@ -54,7 +54,7 @@ struct inode_operations smb_dir_inode_operations = | |||
54 | .setattr = smb_notify_change, | 54 | .setattr = smb_notify_change, |
55 | }; | 55 | }; |
56 | 56 | ||
57 | struct inode_operations smb_dir_inode_operations_unix = | 57 | const struct inode_operations smb_dir_inode_operations_unix = |
58 | { | 58 | { |
59 | .create = smb_create, | 59 | .create = smb_create, |
60 | .lookup = smb_lookup, | 60 | .lookup = smb_lookup, |