diff options
author | Arjan van de Ven | 2007-02-12 09:55:40 +0100 |
---|---|---|
committer | Linus Torvalds | 2007-02-12 18:48:46 +0100 |
commit | c5ef1c42c51b1b5b4a401a6517bdda30933ddbaf (patch) | |
tree | e1a9804a8af427f700aaba4b386cf8679b317e83 /fs/smbfs/dir.c | |
parent | [PATCH] mark struct inode_operations const 2 (diff) | |
download | kernel-qcow2-linux-c5ef1c42c51b1b5b4a401a6517bdda30933ddbaf.tar.gz kernel-qcow2-linux-c5ef1c42c51b1b5b4a401a6517bdda30933ddbaf.tar.xz kernel-qcow2-linux-c5ef1c42c51b1b5b4a401a6517bdda30933ddbaf.zip |
[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 = .open = smb_dir_open, }; -struct inode_operations smb_dir_inode_operations = +const struct inode_operations smb_dir_inode_operations = { .create = smb_create, .lookup = smb_lookup, @@ -54,7 +54,7 @@ struct inode_operations smb_dir_inode_operations = .setattr = smb_notify_change, }; -struct inode_operations smb_dir_inode_operations_unix = +const struct inode_operations smb_dir_inode_operations_unix = { .create = smb_create, .lookup = smb_lookup, |