aboutsummaryrefslogtreecommitdiffstats
path: root/fs/smbfs
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:40 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:46 -0500
commitc5ef1c42c51b1b5b4a401a6517bdda30933ddbaf (patch)
treee1a9804a8af427f700aaba4b386cf8679b317e83 /fs/smbfs
parent92e1d5be91a0e3ffa5c4697eeb09b2aa22792122 (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')
-rw-r--r--fs/smbfs/dir.c4
-rw-r--r--fs/smbfs/file.c2
-rw-r--r--fs/smbfs/proto.h8
-rw-r--r--fs/smbfs/symlink.c2
4 files changed, 8 insertions, 8 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
45struct inode_operations smb_dir_inode_operations = 45const 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
57struct inode_operations smb_dir_inode_operations_unix = 57const 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,
diff --git a/fs/smbfs/file.c b/fs/smbfs/file.c
index e50533a79517..f161797160c4 100644
--- a/fs/smbfs/file.c
+++ b/fs/smbfs/file.c
@@ -418,7 +418,7 @@ const struct file_operations smb_file_operations =
418 .sendfile = smb_file_sendfile, 418 .sendfile = smb_file_sendfile,
419}; 419};
420 420
421struct inode_operations smb_file_inode_operations = 421const struct inode_operations smb_file_inode_operations =
422{ 422{
423 .permission = smb_file_permission, 423 .permission = smb_file_permission,
424 .getattr = smb_getattr, 424 .getattr = smb_getattr,
diff --git a/fs/smbfs/proto.h b/fs/smbfs/proto.h
index 34fb462b2379..03f456c1b7d4 100644
--- a/fs/smbfs/proto.h
+++ b/fs/smbfs/proto.h
@@ -36,8 +36,8 @@ extern int smb_proc_link(struct smb_sb_info *server, struct dentry *dentry, stru
36extern void smb_install_null_ops(struct smb_ops *ops); 36extern void smb_install_null_ops(struct smb_ops *ops);
37/* dir.c */ 37/* dir.c */
38extern const struct file_operations smb_dir_operations; 38extern const struct file_operations smb_dir_operations;
39extern struct inode_operations smb_dir_inode_operations; 39extern const struct inode_operations smb_dir_inode_operations;
40extern struct inode_operations smb_dir_inode_operations_unix; 40extern const struct inode_operations smb_dir_inode_operations_unix;
41extern void smb_new_dentry(struct dentry *dentry); 41extern void smb_new_dentry(struct dentry *dentry);
42extern void smb_renew_times(struct dentry *dentry); 42extern void smb_renew_times(struct dentry *dentry);
43/* cache.c */ 43/* cache.c */
@@ -65,7 +65,7 @@ extern int smb_notify_change(struct dentry *dentry, struct iattr *attr);
65/* file.c */ 65/* file.c */
66extern const struct address_space_operations smb_file_aops; 66extern const struct address_space_operations smb_file_aops;
67extern const struct file_operations smb_file_operations; 67extern const struct file_operations smb_file_operations;
68extern struct inode_operations smb_file_inode_operations; 68extern const struct inode_operations smb_file_inode_operations;
69/* ioctl.c */ 69/* ioctl.c */
70extern int smb_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); 70extern int smb_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);
71/* smbiod.c */ 71/* smbiod.c */
@@ -84,4 +84,4 @@ extern int smb_request_send_server(struct smb_sb_info *server);
84extern int smb_request_recv(struct smb_sb_info *server); 84extern int smb_request_recv(struct smb_sb_info *server);
85/* symlink.c */ 85/* symlink.c */
86extern int smb_symlink(struct inode *inode, struct dentry *dentry, const char *oldname); 86extern int smb_symlink(struct inode *inode, struct dentry *dentry, const char *oldname);
87extern struct inode_operations smb_link_inode_operations; 87extern const struct inode_operations smb_link_inode_operations;
diff --git a/fs/smbfs/symlink.c b/fs/smbfs/symlink.c
index cdc53c4fb381..e4bf3456d07e 100644
--- a/fs/smbfs/symlink.c
+++ b/fs/smbfs/symlink.c
@@ -62,7 +62,7 @@ static void smb_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
62 __putname(s); 62 __putname(s);
63} 63}
64 64
65struct inode_operations smb_link_inode_operations = 65const struct inode_operations smb_link_inode_operations =
66{ 66{
67 .readlink = generic_readlink, 67 .readlink = generic_readlink,
68 .follow_link = smb_follow_link, 68 .follow_link = smb_follow_link,