aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--fs/proc/base.c20
-rw-r--r--fs/proc/generic.c6
-rw-r--r--fs/proc/root.c2
-rw-r--r--fs/qnx4/dir.c2
-rw-r--r--fs/qnx4/file.c2
-rw-r--r--fs/ramfs/file-mmu.c2
-rw-r--r--fs/ramfs/file-nommu.c2
-rw-r--r--fs/ramfs/inode.c4
-rw-r--r--fs/ramfs/internal.h2
-rw-r--r--fs/reiserfs/file.c2
-rw-r--r--fs/reiserfs/namei.c6
-rw-r--r--fs/romfs/inode.c2
-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
-rw-r--r--fs/sysfs/dir.c2
-rw-r--r--fs/sysfs/inode.c2
-rw-r--r--fs/sysfs/symlink.c2
-rw-r--r--fs/sysfs/sysfs.h4
-rw-r--r--fs/sysv/file.c2
-rw-r--r--fs/sysv/inode.c2
-rw-r--r--fs/sysv/namei.c2
-rw-r--r--fs/sysv/symlink.c2
-rw-r--r--fs/sysv/sysv.h6
-rw-r--r--fs/udf/file.c2
-rw-r--r--fs/udf/namei.c2
-rw-r--r--fs/udf/udfdecl.h4
-rw-r--r--fs/ufs/namei.c2
-rw-r--r--fs/ufs/symlink.c2
-rw-r--r--fs/ufs/truncate.c2
-rw-r--r--fs/vfat/namei.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.c6
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.h6
-rw-r--r--include/linux/coda_linux.h6
-rw-r--r--include/linux/efs_fs.h2
-rw-r--r--include/linux/ext3_fs.h10
-rw-r--r--include/linux/ext4_fs.h10
-rw-r--r--include/linux/fs.h6
-rw-r--r--include/linux/msdos_fs.h6
-rw-r--r--include/linux/ncp_fs.h4
-rw-r--r--include/linux/nfs_fs.h14
-rw-r--r--include/linux/nfs_xdr.h4
-rw-r--r--include/linux/phonedev.h2
-rw-r--r--include/linux/proc_fs.h4
-rw-r--r--include/linux/qnx4_fs.h4
-rw-r--r--include/linux/reiserfs_fs.h8
-rw-r--r--include/linux/ufs_fs.h6
48 files changed, 103 insertions, 103 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 7b1ded63fa63..4f5745af8c19 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -93,7 +93,7 @@ struct pid_entry {
93 int len; 93 int len;
94 char *name; 94 char *name;
95 mode_t mode; 95 mode_t mode;
96 struct inode_operations *iop; 96 const struct inode_operations *iop;
97 const struct file_operations *fop; 97 const struct file_operations *fop;
98 union proc_op op; 98 union proc_op op;
99}; 99};
@@ -352,7 +352,7 @@ static int proc_setattr(struct dentry *dentry, struct iattr *attr)
352 return error; 352 return error;
353} 353}
354 354
355static struct inode_operations proc_def_inode_operations = { 355static const struct inode_operations proc_def_inode_operations = {
356 .setattr = proc_setattr, 356 .setattr = proc_setattr,
357}; 357};
358 358
@@ -980,7 +980,7 @@ out:
980 return error; 980 return error;
981} 981}
982 982
983static struct inode_operations proc_pid_link_inode_operations = { 983static const struct inode_operations proc_pid_link_inode_operations = {
984 .readlink = proc_pid_readlink, 984 .readlink = proc_pid_readlink,
985 .follow_link = proc_pid_follow_link, 985 .follow_link = proc_pid_follow_link,
986 .setattr = proc_setattr, 986 .setattr = proc_setattr,
@@ -1416,7 +1416,7 @@ static const struct file_operations proc_fd_operations = {
1416/* 1416/*
1417 * proc directories can do almost nothing.. 1417 * proc directories can do almost nothing..
1418 */ 1418 */
1419static struct inode_operations proc_fd_inode_operations = { 1419static const struct inode_operations proc_fd_inode_operations = {
1420 .lookup = proc_lookupfd, 1420 .lookup = proc_lookupfd,
1421 .setattr = proc_setattr, 1421 .setattr = proc_setattr,
1422}; 1422};
@@ -1656,7 +1656,7 @@ static struct dentry *proc_attr_dir_lookup(struct inode *dir,
1656 attr_dir_stuff, ARRAY_SIZE(attr_dir_stuff)); 1656 attr_dir_stuff, ARRAY_SIZE(attr_dir_stuff));
1657} 1657}
1658 1658
1659static struct inode_operations proc_attr_dir_inode_operations = { 1659static const struct inode_operations proc_attr_dir_inode_operations = {
1660 .lookup = proc_attr_dir_lookup, 1660 .lookup = proc_attr_dir_lookup,
1661 .getattr = pid_getattr, 1661 .getattr = pid_getattr,
1662 .setattr = proc_setattr, 1662 .setattr = proc_setattr,
@@ -1682,7 +1682,7 @@ static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd)
1682 return ERR_PTR(vfs_follow_link(nd,tmp)); 1682 return ERR_PTR(vfs_follow_link(nd,tmp));
1683} 1683}
1684 1684
1685static struct inode_operations proc_self_inode_operations = { 1685static const struct inode_operations proc_self_inode_operations = {
1686 .readlink = proc_self_readlink, 1686 .readlink = proc_self_readlink,
1687 .follow_link = proc_self_follow_link, 1687 .follow_link = proc_self_follow_link,
1688}; 1688};
@@ -1835,7 +1835,7 @@ static int proc_pid_io_accounting(struct task_struct *task, char *buffer)
1835 * Thread groups 1835 * Thread groups
1836 */ 1836 */
1837static const struct file_operations proc_task_operations; 1837static const struct file_operations proc_task_operations;
1838static struct inode_operations proc_task_inode_operations; 1838static const struct inode_operations proc_task_inode_operations;
1839 1839
1840static struct pid_entry tgid_base_stuff[] = { 1840static struct pid_entry tgid_base_stuff[] = {
1841 DIR("task", S_IRUGO|S_IXUGO, task), 1841 DIR("task", S_IRUGO|S_IXUGO, task),
@@ -1904,7 +1904,7 @@ static struct dentry *proc_tgid_base_lookup(struct inode *dir, struct dentry *de
1904 tgid_base_stuff, ARRAY_SIZE(tgid_base_stuff)); 1904 tgid_base_stuff, ARRAY_SIZE(tgid_base_stuff));
1905} 1905}
1906 1906
1907static struct inode_operations proc_tgid_base_inode_operations = { 1907static const struct inode_operations proc_tgid_base_inode_operations = {
1908 .lookup = proc_tgid_base_lookup, 1908 .lookup = proc_tgid_base_lookup,
1909 .getattr = pid_getattr, 1909 .getattr = pid_getattr,
1910 .setattr = proc_setattr, 1910 .setattr = proc_setattr,
@@ -2182,7 +2182,7 @@ static const struct file_operations proc_tid_base_operations = {
2182 .readdir = proc_tid_base_readdir, 2182 .readdir = proc_tid_base_readdir,
2183}; 2183};
2184 2184
2185static struct inode_operations proc_tid_base_inode_operations = { 2185static const struct inode_operations proc_tid_base_inode_operations = {
2186 .lookup = proc_tid_base_lookup, 2186 .lookup = proc_tid_base_lookup,
2187 .getattr = pid_getattr, 2187 .getattr = pid_getattr,
2188 .setattr = proc_setattr, 2188 .setattr = proc_setattr,
@@ -2408,7 +2408,7 @@ static int proc_task_getattr(struct vfsmount *mnt, struct dentry *dentry, struct
2408 return 0; 2408 return 0;
2409} 2409}
2410 2410
2411static struct inode_operations proc_task_inode_operations = { 2411static const struct inode_operations proc_task_inode_operations = {
2412 .lookup = proc_task_lookup, 2412 .lookup = proc_task_lookup,
2413 .getattr = proc_task_getattr, 2413 .getattr = proc_task_getattr,
2414 .setattr = proc_setattr, 2414 .setattr = proc_setattr,
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index aa52f1080e62..0cdc00d9d97e 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -265,7 +265,7 @@ static int proc_getattr(struct vfsmount *mnt, struct dentry *dentry,
265 return 0; 265 return 0;
266} 266}
267 267
268static struct inode_operations proc_file_inode_operations = { 268static const struct inode_operations proc_file_inode_operations = {
269 .setattr = proc_notify_change, 269 .setattr = proc_notify_change,
270}; 270};
271 271
@@ -357,7 +357,7 @@ static void *proc_follow_link(struct dentry *dentry, struct nameidata *nd)
357 return NULL; 357 return NULL;
358} 358}
359 359
360static struct inode_operations proc_link_inode_operations = { 360static const struct inode_operations proc_link_inode_operations = {
361 .readlink = generic_readlink, 361 .readlink = generic_readlink,
362 .follow_link = proc_follow_link, 362 .follow_link = proc_follow_link,
363}; 363};
@@ -505,7 +505,7 @@ static const struct file_operations proc_dir_operations = {
505/* 505/*
506 * proc directories can do almost nothing.. 506 * proc directories can do almost nothing..
507 */ 507 */
508static struct inode_operations proc_dir_inode_operations = { 508static const struct inode_operations proc_dir_inode_operations = {
509 .lookup = proc_lookup, 509 .lookup = proc_lookup,
510 .getattr = proc_getattr, 510 .getattr = proc_getattr,
511 .setattr = proc_notify_change, 511 .setattr = proc_notify_change,
diff --git a/fs/proc/root.c b/fs/proc/root.c
index 81c92e967a98..af154458b540 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -144,7 +144,7 @@ static const struct file_operations proc_root_operations = {
144/* 144/*
145 * proc root can do almost nothing.. 145 * proc root can do almost nothing..
146 */ 146 */
147static struct inode_operations proc_root_inode_operations = { 147static const struct inode_operations proc_root_inode_operations = {
148 .lookup = proc_root_lookup, 148 .lookup = proc_root_lookup,
149 .getattr = proc_root_getattr, 149 .getattr = proc_root_getattr,
150}; 150};
diff --git a/fs/qnx4/dir.c b/fs/qnx4/dir.c
index c94db1db7a71..ea9ffefb48ad 100644
--- a/fs/qnx4/dir.c
+++ b/fs/qnx4/dir.c
@@ -87,7 +87,7 @@ const struct file_operations qnx4_dir_operations =
87 .fsync = file_fsync, 87 .fsync = file_fsync,
88}; 88};
89 89
90struct inode_operations qnx4_dir_inode_operations = 90const struct inode_operations qnx4_dir_inode_operations =
91{ 91{
92 .lookup = qnx4_lookup, 92 .lookup = qnx4_lookup,
93#ifdef CONFIG_QNX4FS_RW 93#ifdef CONFIG_QNX4FS_RW
diff --git a/fs/qnx4/file.c b/fs/qnx4/file.c
index 467e5ac7280e..44649981bbc8 100644
--- a/fs/qnx4/file.c
+++ b/fs/qnx4/file.c
@@ -33,7 +33,7 @@ const struct file_operations qnx4_file_operations =
33#endif 33#endif
34}; 34};
35 35
36struct inode_operations qnx4_file_inode_operations = 36const struct inode_operations qnx4_file_inode_operations =
37{ 37{
38#ifdef CONFIG_QNX4FS_RW 38#ifdef CONFIG_QNX4FS_RW
39 .truncate = qnx4_truncate, 39 .truncate = qnx4_truncate,
diff --git a/fs/ramfs/file-mmu.c b/fs/ramfs/file-mmu.c
index b935a3dd4b65..2f14774a124f 100644
--- a/fs/ramfs/file-mmu.c
+++ b/fs/ramfs/file-mmu.c
@@ -45,6 +45,6 @@ const struct file_operations ramfs_file_operations = {
45 .llseek = generic_file_llseek, 45 .llseek = generic_file_llseek,
46}; 46};
47 47
48struct inode_operations ramfs_file_inode_operations = { 48const struct inode_operations ramfs_file_inode_operations = {
49 .getattr = simple_getattr, 49 .getattr = simple_getattr,
50}; 50};
diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c
index d05e09ac9a99..d3fd7c6732d2 100644
--- a/fs/ramfs/file-nommu.c
+++ b/fs/ramfs/file-nommu.c
@@ -47,7 +47,7 @@ const struct file_operations ramfs_file_operations = {
47 .llseek = generic_file_llseek, 47 .llseek = generic_file_llseek,
48}; 48};
49 49
50struct inode_operations ramfs_file_inode_operations = { 50const struct inode_operations ramfs_file_inode_operations = {
51 .setattr = ramfs_nommu_setattr, 51 .setattr = ramfs_nommu_setattr,
52 .getattr = simple_getattr, 52 .getattr = simple_getattr,
53}; 53};
diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
index 2faf4cdf61b0..7a96b1d662a2 100644
--- a/fs/ramfs/inode.c
+++ b/fs/ramfs/inode.c
@@ -41,7 +41,7 @@
41#define RAMFS_MAGIC 0x858458f6 41#define RAMFS_MAGIC 0x858458f6
42 42
43static struct super_operations ramfs_ops; 43static struct super_operations ramfs_ops;
44static struct inode_operations ramfs_dir_inode_operations; 44static const struct inode_operations ramfs_dir_inode_operations;
45 45
46static struct backing_dev_info ramfs_backing_dev_info = { 46static struct backing_dev_info ramfs_backing_dev_info = {
47 .ra_pages = 0, /* No readahead */ 47 .ra_pages = 0, /* No readahead */
@@ -143,7 +143,7 @@ static int ramfs_symlink(struct inode * dir, struct dentry *dentry, const char *
143 return error; 143 return error;
144} 144}
145 145
146static struct inode_operations ramfs_dir_inode_operations = { 146static const struct inode_operations ramfs_dir_inode_operations = {
147 .create = ramfs_create, 147 .create = ramfs_create,
148 .lookup = simple_lookup, 148 .lookup = simple_lookup,
149 .link = simple_link, 149 .link = simple_link,
diff --git a/fs/ramfs/internal.h b/fs/ramfs/internal.h
index c2bb58e74653..af7cc074a476 100644
--- a/fs/ramfs/internal.h
+++ b/fs/ramfs/internal.h
@@ -12,4 +12,4 @@
12 12
13extern const struct address_space_operations ramfs_aops; 13extern const struct address_space_operations ramfs_aops;
14extern const struct file_operations ramfs_file_operations; 14extern const struct file_operations ramfs_file_operations;
15extern struct inode_operations ramfs_file_inode_operations; 15extern const struct inode_operations ramfs_file_inode_operations;
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c
index 5109f1d5e7ff..abfada2f52db 100644
--- a/fs/reiserfs/file.c
+++ b/fs/reiserfs/file.c
@@ -1556,7 +1556,7 @@ const struct file_operations reiserfs_file_operations = {
1556 .splice_write = generic_file_splice_write, 1556 .splice_write = generic_file_splice_write,
1557}; 1557};
1558 1558
1559struct inode_operations reiserfs_file_inode_operations = { 1559const struct inode_operations reiserfs_file_inode_operations = {
1560 .truncate = reiserfs_vfs_truncate_file, 1560 .truncate = reiserfs_vfs_truncate_file,
1561 .setattr = reiserfs_setattr, 1561 .setattr = reiserfs_setattr,
1562 .setxattr = reiserfs_setxattr, 1562 .setxattr = reiserfs_setxattr,
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
index 23f5cd5bbf56..a2161840bc7c 100644
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -1525,7 +1525,7 @@ static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry,
1525/* 1525/*
1526 * directories can handle most operations... 1526 * directories can handle most operations...
1527 */ 1527 */
1528struct inode_operations reiserfs_dir_inode_operations = { 1528const struct inode_operations reiserfs_dir_inode_operations = {
1529 //&reiserfs_dir_operations, /* default_file_ops */ 1529 //&reiserfs_dir_operations, /* default_file_ops */
1530 .create = reiserfs_create, 1530 .create = reiserfs_create,
1531 .lookup = reiserfs_lookup, 1531 .lookup = reiserfs_lookup,
@@ -1548,7 +1548,7 @@ struct inode_operations reiserfs_dir_inode_operations = {
1548 * symlink operations.. same as page_symlink_inode_operations, with xattr 1548 * symlink operations.. same as page_symlink_inode_operations, with xattr
1549 * stuff added 1549 * stuff added
1550 */ 1550 */
1551struct inode_operations reiserfs_symlink_inode_operations = { 1551const struct inode_operations reiserfs_symlink_inode_operations = {
1552 .readlink = generic_readlink, 1552 .readlink = generic_readlink,
1553 .follow_link = page_follow_link_light, 1553 .follow_link = page_follow_link_light,
1554 .put_link = page_put_link, 1554 .put_link = page_put_link,
@@ -1564,7 +1564,7 @@ struct inode_operations reiserfs_symlink_inode_operations = {
1564/* 1564/*
1565 * special file operations.. just xattr/acl stuff 1565 * special file operations.. just xattr/acl stuff
1566 */ 1566 */
1567struct inode_operations reiserfs_special_inode_operations = { 1567const struct inode_operations reiserfs_special_inode_operations = {
1568 .setattr = reiserfs_setattr, 1568 .setattr = reiserfs_setattr,
1569 .setxattr = reiserfs_setxattr, 1569 .setxattr = reiserfs_setxattr,
1570 .getxattr = reiserfs_getxattr, 1570 .getxattr = reiserfs_getxattr,
diff --git a/fs/romfs/inode.c b/fs/romfs/inode.c
index d3e243a6f609..1e712cc1693b 100644
--- a/fs/romfs/inode.c
+++ b/fs/romfs/inode.c
@@ -468,7 +468,7 @@ static const struct file_operations romfs_dir_operations = {
468 .readdir = romfs_readdir, 468 .readdir = romfs_readdir,
469}; 469};
470 470
471static struct inode_operations romfs_dir_inode_operations = { 471static const struct inode_operations romfs_dir_inode_operations = {
472 .lookup = romfs_lookup, 472 .lookup = romfs_lookup,
473}; 473};
474 474
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,
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 9e95e7abaf69..8813990304fe 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -296,7 +296,7 @@ static struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry,
296 return ERR_PTR(err); 296 return ERR_PTR(err);
297} 297}
298 298
299struct inode_operations sysfs_dir_inode_operations = { 299const struct inode_operations sysfs_dir_inode_operations = {
300 .lookup = sysfs_lookup, 300 .lookup = sysfs_lookup,
301 .setattr = sysfs_setattr, 301 .setattr = sysfs_setattr,
302}; 302};
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index 542d2bcc73df..dd1344b007f5 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -29,7 +29,7 @@ static struct backing_dev_info sysfs_backing_dev_info = {
29 .capabilities = BDI_CAP_NO_ACCT_DIRTY | BDI_CAP_NO_WRITEBACK, 29 .capabilities = BDI_CAP_NO_ACCT_DIRTY | BDI_CAP_NO_WRITEBACK,
30}; 30};
31 31
32static struct inode_operations sysfs_inode_operations ={ 32static const struct inode_operations sysfs_inode_operations ={
33 .setattr = sysfs_setattr, 33 .setattr = sysfs_setattr,
34}; 34};
35 35
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c
index 4869f611192f..7b9c5bfde920 100644
--- a/fs/sysfs/symlink.c
+++ b/fs/sysfs/symlink.c
@@ -181,7 +181,7 @@ static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *co
181 free_page((unsigned long)page); 181 free_page((unsigned long)page);
182} 182}
183 183
184struct inode_operations sysfs_symlink_inode_operations = { 184const struct inode_operations sysfs_symlink_inode_operations = {
185 .readlink = generic_readlink, 185 .readlink = generic_readlink,
186 .follow_link = sysfs_follow_link, 186 .follow_link = sysfs_follow_link,
187 .put_link = sysfs_put_link, 187 .put_link = sysfs_put_link,
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index fe1cbfd208ed..d976b0005549 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -26,8 +26,8 @@ extern struct super_block * sysfs_sb;
26extern const struct file_operations sysfs_dir_operations; 26extern const struct file_operations sysfs_dir_operations;
27extern const struct file_operations sysfs_file_operations; 27extern const struct file_operations sysfs_file_operations;
28extern const struct file_operations bin_fops; 28extern const struct file_operations bin_fops;
29extern struct inode_operations sysfs_dir_inode_operations; 29extern const struct inode_operations sysfs_dir_inode_operations;
30extern struct inode_operations sysfs_symlink_inode_operations; 30extern const struct inode_operations sysfs_symlink_inode_operations;
31 31
32struct sysfs_symlink { 32struct sysfs_symlink {
33 char * link_name; 33 char * link_name;
diff --git a/fs/sysv/file.c b/fs/sysv/file.c
index 47a4b728f15b..0732ddb9020b 100644
--- a/fs/sysv/file.c
+++ b/fs/sysv/file.c
@@ -30,7 +30,7 @@ const struct file_operations sysv_file_operations = {
30 .sendfile = generic_file_sendfile, 30 .sendfile = generic_file_sendfile,
31}; 31};
32 32
33struct inode_operations sysv_file_inode_operations = { 33const struct inode_operations sysv_file_inode_operations = {
34 .truncate = sysv_truncate, 34 .truncate = sysv_truncate,
35 .getattr = sysv_getattr, 35 .getattr = sysv_getattr,
36}; 36};
diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c
index ead9864567e3..13dd75c4bc85 100644
--- a/fs/sysv/inode.c
+++ b/fs/sysv/inode.c
@@ -142,7 +142,7 @@ static inline void write3byte(struct sysv_sb_info *sbi,
142 } 142 }
143} 143}
144 144
145static struct inode_operations sysv_symlink_inode_operations = { 145static const struct inode_operations sysv_symlink_inode_operations = {
146 .readlink = generic_readlink, 146 .readlink = generic_readlink,
147 .follow_link = page_follow_link_light, 147 .follow_link = page_follow_link_light,
148 .put_link = page_put_link, 148 .put_link = page_put_link,
diff --git a/fs/sysv/namei.c b/fs/sysv/namei.c
index f7c08db8e34c..4e48abbd2b5d 100644
--- a/fs/sysv/namei.c
+++ b/fs/sysv/namei.c
@@ -292,7 +292,7 @@ out:
292/* 292/*
293 * directories can handle most operations... 293 * directories can handle most operations...
294 */ 294 */
295struct inode_operations sysv_dir_inode_operations = { 295const struct inode_operations sysv_dir_inode_operations = {
296 .create = sysv_create, 296 .create = sysv_create,
297 .lookup = sysv_lookup, 297 .lookup = sysv_lookup,
298 .link = sysv_link, 298 .link = sysv_link,
diff --git a/fs/sysv/symlink.c b/fs/sysv/symlink.c
index b85ce61d635c..00d2f8a43e4e 100644
--- a/fs/sysv/symlink.c
+++ b/fs/sysv/symlink.c
@@ -14,7 +14,7 @@ static void *sysv_follow_link(struct dentry *dentry, struct nameidata *nd)
14 return NULL; 14 return NULL;
15} 15}
16 16
17struct inode_operations sysv_fast_symlink_inode_operations = { 17const struct inode_operations sysv_fast_symlink_inode_operations = {
18 .readlink = generic_readlink, 18 .readlink = generic_readlink,
19 .follow_link = sysv_follow_link, 19 .follow_link = sysv_follow_link,
20}; 20};
diff --git a/fs/sysv/sysv.h b/fs/sysv/sysv.h
index dcb18b2171fe..a320edcf541e 100644
--- a/fs/sysv/sysv.h
+++ b/fs/sysv/sysv.h
@@ -159,9 +159,9 @@ extern struct sysv_dir_entry *sysv_dotdot(struct inode *, struct page **);
159extern ino_t sysv_inode_by_name(struct dentry *); 159extern ino_t sysv_inode_by_name(struct dentry *);
160 160
161 161
162extern struct inode_operations sysv_file_inode_operations; 162extern const struct inode_operations sysv_file_inode_operations;
163extern struct inode_operations sysv_dir_inode_operations; 163extern const struct inode_operations sysv_dir_inode_operations;
164extern struct inode_operations sysv_fast_symlink_inode_operations; 164extern const struct inode_operations sysv_fast_symlink_inode_operations;
165extern const struct file_operations sysv_file_operations; 165extern const struct file_operations sysv_file_operations;
166extern const struct file_operations sysv_dir_operations; 166extern const struct file_operations sysv_dir_operations;
167extern const struct address_space_operations sysv_aops; 167extern const struct address_space_operations sysv_aops;
diff --git a/fs/udf/file.c b/fs/udf/file.c
index d81f2db7b0e3..40d5047defea 100644
--- a/fs/udf/file.c
+++ b/fs/udf/file.c
@@ -263,6 +263,6 @@ const struct file_operations udf_file_operations = {
263 .sendfile = generic_file_sendfile, 263 .sendfile = generic_file_sendfile,
264}; 264};
265 265
266struct inode_operations udf_file_inode_operations = { 266const struct inode_operations udf_file_inode_operations = {
267 .truncate = udf_truncate, 267 .truncate = udf_truncate,
268}; 268};
diff --git a/fs/udf/namei.c b/fs/udf/namei.c
index 73163325e5ec..fe361cd19a98 100644
--- a/fs/udf/namei.c
+++ b/fs/udf/namei.c
@@ -1308,7 +1308,7 @@ end_rename:
1308 return retval; 1308 return retval;
1309} 1309}
1310 1310
1311struct inode_operations udf_dir_inode_operations = { 1311const struct inode_operations udf_dir_inode_operations = {
1312 .lookup = udf_lookup, 1312 .lookup = udf_lookup,
1313 .create = udf_create, 1313 .create = udf_create,
1314 .link = udf_link, 1314 .link = udf_link,
diff --git a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h
index 1033b7cf2939..ee1dece1f6f5 100644
--- a/fs/udf/udfdecl.h
+++ b/fs/udf/udfdecl.h
@@ -42,9 +42,9 @@ struct task_struct;
42struct buffer_head; 42struct buffer_head;
43struct super_block; 43struct super_block;
44 44
45extern struct inode_operations udf_dir_inode_operations; 45extern const struct inode_operations udf_dir_inode_operations;
46extern const struct file_operations udf_dir_operations; 46extern const struct file_operations udf_dir_operations;
47extern struct inode_operations udf_file_inode_operations; 47extern const struct inode_operations udf_file_inode_operations;
48extern const struct file_operations udf_file_operations; 48extern const struct file_operations udf_file_operations;
49extern const struct address_space_operations udf_aops; 49extern const struct address_space_operations udf_aops;
50extern const struct address_space_operations udf_adinicb_aops; 50extern const struct address_space_operations udf_adinicb_aops;
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c
index e84c0ecf0730..a059ccd064ea 100644
--- a/fs/ufs/namei.c
+++ b/fs/ufs/namei.c
@@ -355,7 +355,7 @@ out:
355 return err; 355 return err;
356} 356}
357 357
358struct inode_operations ufs_dir_inode_operations = { 358const struct inode_operations ufs_dir_inode_operations = {
359 .create = ufs_create, 359 .create = ufs_create,
360 .lookup = ufs_lookup, 360 .lookup = ufs_lookup,
361 .link = ufs_link, 361 .link = ufs_link,
diff --git a/fs/ufs/symlink.c b/fs/ufs/symlink.c
index 337512ed5781..d8549f807e80 100644
--- a/fs/ufs/symlink.c
+++ b/fs/ufs/symlink.c
@@ -36,7 +36,7 @@ static void *ufs_follow_link(struct dentry *dentry, struct nameidata *nd)
36 return NULL; 36 return NULL;
37} 37}
38 38
39struct inode_operations ufs_fast_symlink_inode_operations = { 39const struct inode_operations ufs_fast_symlink_inode_operations = {
40 .readlink = generic_readlink, 40 .readlink = generic_readlink,
41 .follow_link = ufs_follow_link, 41 .follow_link = ufs_follow_link,
42}; 42};
diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c
index 77ed77932aeb..749581fa7729 100644
--- a/fs/ufs/truncate.c
+++ b/fs/ufs/truncate.c
@@ -513,6 +513,6 @@ static int ufs_setattr(struct dentry *dentry, struct iattr *attr)
513 return inode_setattr(inode, attr); 513 return inode_setattr(inode, attr);
514} 514}
515 515
516struct inode_operations ufs_file_inode_operations = { 516const struct inode_operations ufs_file_inode_operations = {
517 .setattr = ufs_setattr, 517 .setattr = ufs_setattr,
518}; 518};
diff --git a/fs/vfat/namei.c b/fs/vfat/namei.c
index 0afd745a37cd..c28add2fbe95 100644
--- a/fs/vfat/namei.c
+++ b/fs/vfat/namei.c
@@ -996,7 +996,7 @@ error_inode:
996 goto out; 996 goto out;
997} 997}
998 998
999static struct inode_operations vfat_dir_inode_operations = { 999static const struct inode_operations vfat_dir_inode_operations = {
1000 .create = vfat_create, 1000 .create = vfat_create,
1001 .lookup = vfat_lookup, 1001 .lookup = vfat_lookup,
1002 .unlink = vfat_unlink, 1002 .unlink = vfat_unlink,
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
index aa4c3b8cae01..0b5fa124bef2 100644
--- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -813,7 +813,7 @@ xfs_vn_removexattr(
813} 813}
814 814
815 815
816struct inode_operations xfs_inode_operations = { 816const struct inode_operations xfs_inode_operations = {
817 .permission = xfs_vn_permission, 817 .permission = xfs_vn_permission,
818 .truncate = xfs_vn_truncate, 818 .truncate = xfs_vn_truncate,
819 .getattr = xfs_vn_getattr, 819 .getattr = xfs_vn_getattr,
@@ -824,7 +824,7 @@ struct inode_operations xfs_inode_operations = {
824 .removexattr = xfs_vn_removexattr, 824 .removexattr = xfs_vn_removexattr,
825}; 825};
826 826
827struct inode_operations xfs_dir_inode_operations = { 827const struct inode_operations xfs_dir_inode_operations = {
828 .create = xfs_vn_create, 828 .create = xfs_vn_create,
829 .lookup = xfs_vn_lookup, 829 .lookup = xfs_vn_lookup,
830 .link = xfs_vn_link, 830 .link = xfs_vn_link,
@@ -843,7 +843,7 @@ struct inode_operations xfs_dir_inode_operations = {
843 .removexattr = xfs_vn_removexattr, 843 .removexattr = xfs_vn_removexattr,
844}; 844};
845 845
846struct inode_operations xfs_symlink_inode_operations = { 846const struct inode_operations xfs_symlink_inode_operations = {
847 .readlink = generic_readlink, 847 .readlink = generic_readlink,
848 .follow_link = xfs_vn_follow_link, 848 .follow_link = xfs_vn_follow_link,
849 .put_link = xfs_vn_put_link, 849 .put_link = xfs_vn_put_link,
diff --git a/fs/xfs/linux-2.6/xfs_iops.h b/fs/xfs/linux-2.6/xfs_iops.h
index ad6173da5678..95a69398fce0 100644
--- a/fs/xfs/linux-2.6/xfs_iops.h
+++ b/fs/xfs/linux-2.6/xfs_iops.h
@@ -18,9 +18,9 @@
18#ifndef __XFS_IOPS_H__ 18#ifndef __XFS_IOPS_H__
19#define __XFS_IOPS_H__ 19#define __XFS_IOPS_H__
20 20
21extern struct inode_operations xfs_inode_operations; 21extern const struct inode_operations xfs_inode_operations;
22extern struct inode_operations xfs_dir_inode_operations; 22extern const struct inode_operations xfs_dir_inode_operations;
23extern struct inode_operations xfs_symlink_inode_operations; 23extern const struct inode_operations xfs_symlink_inode_operations;
24 24
25extern const struct file_operations xfs_file_operations; 25extern const struct file_operations xfs_file_operations;
26extern const struct file_operations xfs_dir_file_operations; 26extern const struct file_operations xfs_dir_file_operations;
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h
index 4c2632a8d31b..e4ac016ad272 100644
--- a/include/linux/coda_linux.h
+++ b/include/linux/coda_linux.h
@@ -23,9 +23,9 @@
23#include <linux/coda_fs_i.h> 23#include <linux/coda_fs_i.h>
24 24
25/* operations */ 25/* operations */
26extern struct inode_operations coda_dir_inode_operations; 26extern const struct inode_operations coda_dir_inode_operations;
27extern struct inode_operations coda_file_inode_operations; 27extern const struct inode_operations coda_file_inode_operations;
28extern struct inode_operations coda_ioctl_inode_operations; 28extern const struct inode_operations coda_ioctl_inode_operations;
29 29
30extern const struct address_space_operations coda_file_aops; 30extern const struct address_space_operations coda_file_aops;
31extern const struct address_space_operations coda_symlink_aops; 31extern const struct address_space_operations coda_symlink_aops;
diff --git a/include/linux/efs_fs.h b/include/linux/efs_fs.h
index 278ef4495819..dfed8009ebff 100644
--- a/include/linux/efs_fs.h
+++ b/include/linux/efs_fs.h
@@ -36,7 +36,7 @@ static inline struct efs_sb_info *SUPER_INFO(struct super_block *sb)
36 36
37struct statfs; 37struct statfs;
38 38
39extern struct inode_operations efs_dir_inode_operations; 39extern const struct inode_operations efs_dir_inode_operations;
40extern const struct file_operations efs_dir_operations; 40extern const struct file_operations efs_dir_operations;
41extern const struct address_space_operations efs_symlink_aops; 41extern const struct address_space_operations efs_symlink_aops;
42 42
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h
index 11cca1bdc0c7..4eb18ac510ae 100644
--- a/include/linux/ext3_fs.h
+++ b/include/linux/ext3_fs.h
@@ -868,16 +868,16 @@ do { \
868extern const struct file_operations ext3_dir_operations; 868extern const struct file_operations ext3_dir_operations;
869 869
870/* file.c */ 870/* file.c */
871extern struct inode_operations ext3_file_inode_operations; 871extern const struct inode_operations ext3_file_inode_operations;
872extern const struct file_operations ext3_file_operations; 872extern const struct file_operations ext3_file_operations;
873 873
874/* namei.c */ 874/* namei.c */
875extern struct inode_operations ext3_dir_inode_operations; 875extern const struct inode_operations ext3_dir_inode_operations;
876extern struct inode_operations ext3_special_inode_operations; 876extern const struct inode_operations ext3_special_inode_operations;
877 877
878/* symlink.c */ 878/* symlink.c */
879extern struct inode_operations ext3_symlink_inode_operations; 879extern const struct inode_operations ext3_symlink_inode_operations;
880extern struct inode_operations ext3_fast_symlink_inode_operations; 880extern const struct inode_operations ext3_fast_symlink_inode_operations;
881 881
882 882
883#endif /* __KERNEL__ */ 883#endif /* __KERNEL__ */
diff --git a/include/linux/ext4_fs.h b/include/linux/ext4_fs.h
index 498503ee613d..54c576d414c3 100644
--- a/include/linux/ext4_fs.h
+++ b/include/linux/ext4_fs.h
@@ -955,16 +955,16 @@ do { \
955extern const struct file_operations ext4_dir_operations; 955extern const struct file_operations ext4_dir_operations;
956 956
957/* file.c */ 957/* file.c */
958extern struct inode_operations ext4_file_inode_operations; 958extern const struct inode_operations ext4_file_inode_operations;
959extern const struct file_operations ext4_file_operations; 959extern const struct file_operations ext4_file_operations;
960 960
961/* namei.c */ 961/* namei.c */
962extern struct inode_operations ext4_dir_inode_operations; 962extern const struct inode_operations ext4_dir_inode_operations;
963extern struct inode_operations ext4_special_inode_operations; 963extern const struct inode_operations ext4_special_inode_operations;
964 964
965/* symlink.c */ 965/* symlink.c */
966extern struct inode_operations ext4_symlink_inode_operations; 966extern const struct inode_operations ext4_symlink_inode_operations;
967extern struct inode_operations ext4_fast_symlink_inode_operations; 967extern const struct inode_operations ext4_fast_symlink_inode_operations;
968 968
969/* extents.c */ 969/* extents.c */
970extern int ext4_ext_tree_init(handle_t *handle, struct inode *); 970extern int ext4_ext_tree_init(handle_t *handle, struct inode *);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 990adcbc0df2..bab891bb2270 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -551,7 +551,7 @@ struct inode {
551 spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ 551 spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */
552 struct mutex i_mutex; 552 struct mutex i_mutex;
553 struct rw_semaphore i_alloc_sem; 553 struct rw_semaphore i_alloc_sem;
554 struct inode_operations *i_op; 554 const struct inode_operations *i_op;
555 const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ 555 const struct file_operations *i_fop; /* former ->i_op->default_file_ops */
556 struct super_block *i_sb; 556 struct super_block *i_sb;
557 struct file_lock *i_flock; 557 struct file_lock *i_flock;
@@ -1828,7 +1828,7 @@ extern void page_put_link(struct dentry *, struct nameidata *, void *);
1828extern int __page_symlink(struct inode *inode, const char *symname, int len, 1828extern int __page_symlink(struct inode *inode, const char *symname, int len,
1829 gfp_t gfp_mask); 1829 gfp_t gfp_mask);
1830extern int page_symlink(struct inode *inode, const char *symname, int len); 1830extern int page_symlink(struct inode *inode, const char *symname, int len);
1831extern struct inode_operations page_symlink_inode_operations; 1831extern const struct inode_operations page_symlink_inode_operations;
1832extern int generic_readlink(struct dentry *, char __user *, int); 1832extern int generic_readlink(struct dentry *, char __user *, int);
1833extern void generic_fillattr(struct inode *, struct kstat *); 1833extern void generic_fillattr(struct inode *, struct kstat *);
1834extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); 1834extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
@@ -1873,7 +1873,7 @@ extern int simple_commit_write(struct file *file, struct page *page,
1873extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); 1873extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *);
1874extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); 1874extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *);
1875extern const struct file_operations simple_dir_operations; 1875extern const struct file_operations simple_dir_operations;
1876extern struct inode_operations simple_dir_inode_operations; 1876extern const struct inode_operations simple_dir_inode_operations;
1877struct tree_descr { char *name; const struct file_operations *ops; int mode; }; 1877struct tree_descr { char *name; const struct file_operations *ops; int mode; };
1878struct dentry *d_alloc_name(struct dentry *, const char *); 1878struct dentry *d_alloc_name(struct dentry *, const char *);
1879extern int simple_fill_super(struct super_block *, int, struct tree_descr *); 1879extern int simple_fill_super(struct super_block *, int, struct tree_descr *);
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index 24a9ef1506b6..fa253fa73aa3 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -234,7 +234,7 @@ struct msdos_sb_info {
234 struct fat_mount_options options; 234 struct fat_mount_options options;
235 struct nls_table *nls_disk; /* Codepage used on disk */ 235 struct nls_table *nls_disk; /* Codepage used on disk */
236 struct nls_table *nls_io; /* Charset used for input and display */ 236 struct nls_table *nls_io; /* Charset used for input and display */
237 void *dir_ops; /* Opaque; default directory operations */ 237 const void *dir_ops; /* Opaque; default directory operations */
238 int dir_per_block; /* dir entries per block */ 238 int dir_per_block; /* dir entries per block */
239 int dir_per_block_bits; /* log2(dir_per_block) */ 239 int dir_per_block_bits; /* log2(dir_per_block) */
240 240
@@ -399,7 +399,7 @@ extern int fat_count_free_clusters(struct super_block *sb);
399extern int fat_generic_ioctl(struct inode *inode, struct file *filp, 399extern int fat_generic_ioctl(struct inode *inode, struct file *filp,
400 unsigned int cmd, unsigned long arg); 400 unsigned int cmd, unsigned long arg);
401extern const struct file_operations fat_file_operations; 401extern const struct file_operations fat_file_operations;
402extern struct inode_operations fat_file_inode_operations; 402extern const struct inode_operations fat_file_inode_operations;
403extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); 403extern int fat_notify_change(struct dentry * dentry, struct iattr * attr);
404extern void fat_truncate(struct inode *inode); 404extern void fat_truncate(struct inode *inode);
405extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, 405extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry,
@@ -413,7 +413,7 @@ extern struct inode *fat_build_inode(struct super_block *sb,
413 struct msdos_dir_entry *de, loff_t i_pos); 413 struct msdos_dir_entry *de, loff_t i_pos);
414extern int fat_sync_inode(struct inode *inode); 414extern int fat_sync_inode(struct inode *inode);
415extern int fat_fill_super(struct super_block *sb, void *data, int silent, 415extern int fat_fill_super(struct super_block *sb, void *data, int silent,
416 struct inode_operations *fs_dir_inode_ops, int isvfat); 416 const struct inode_operations *fs_dir_inode_ops, int isvfat);
417 417
418extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, 418extern int fat_flush_inodes(struct super_block *sb, struct inode *i1,
419 struct inode *i2); 419 struct inode *i2);
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h
index 0ea7f89e613c..83e39eb054d3 100644
--- a/include/linux/ncp_fs.h
+++ b/include/linux/ncp_fs.h
@@ -204,7 +204,7 @@ void ncp_update_inode(struct inode *, struct ncp_entry_info *);
204void ncp_update_inode2(struct inode *, struct ncp_entry_info *); 204void ncp_update_inode2(struct inode *, struct ncp_entry_info *);
205 205
206/* linux/fs/ncpfs/dir.c */ 206/* linux/fs/ncpfs/dir.c */
207extern struct inode_operations ncp_dir_inode_operations; 207extern const struct inode_operations ncp_dir_inode_operations;
208extern const struct file_operations ncp_dir_operations; 208extern const struct file_operations ncp_dir_operations;
209int ncp_conn_logged_in(struct super_block *); 209int ncp_conn_logged_in(struct super_block *);
210int ncp_date_dos2unix(__le16 time, __le16 date); 210int ncp_date_dos2unix(__le16 time, __le16 date);
@@ -226,7 +226,7 @@ void ncp_lock_server(struct ncp_server *server);
226void ncp_unlock_server(struct ncp_server *server); 226void ncp_unlock_server(struct ncp_server *server);
227 227
228/* linux/fs/ncpfs/file.c */ 228/* linux/fs/ncpfs/file.c */
229extern struct inode_operations ncp_file_inode_operations; 229extern const struct inode_operations ncp_file_inode_operations;
230extern const struct file_operations ncp_file_operations; 230extern const struct file_operations ncp_file_operations;
231int ncp_make_open(struct inode *, int); 231int ncp_make_open(struct inode *, int);
232 232
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index c5d4084773e8..ed0f2eac8f50 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -331,9 +331,9 @@ static inline void nfs_fattr_init(struct nfs_fattr *fattr)
331/* 331/*
332 * linux/fs/nfs/file.c 332 * linux/fs/nfs/file.c
333 */ 333 */
334extern struct inode_operations nfs_file_inode_operations; 334extern const struct inode_operations nfs_file_inode_operations;
335#ifdef CONFIG_NFS_V3 335#ifdef CONFIG_NFS_V3
336extern struct inode_operations nfs3_file_inode_operations; 336extern const struct inode_operations nfs3_file_inode_operations;
337#endif /* CONFIG_NFS_V3 */ 337#endif /* CONFIG_NFS_V3 */
338extern const struct file_operations nfs_file_operations; 338extern const struct file_operations nfs_file_operations;
339extern const struct address_space_operations nfs_file_aops; 339extern const struct address_space_operations nfs_file_aops;
@@ -380,9 +380,9 @@ extern ssize_t nfs_file_direct_write(struct kiocb *iocb,
380/* 380/*
381 * linux/fs/nfs/dir.c 381 * linux/fs/nfs/dir.c
382 */ 382 */
383extern struct inode_operations nfs_dir_inode_operations; 383extern const struct inode_operations nfs_dir_inode_operations;
384#ifdef CONFIG_NFS_V3 384#ifdef CONFIG_NFS_V3
385extern struct inode_operations nfs3_dir_inode_operations; 385extern const struct inode_operations nfs3_dir_inode_operations;
386#endif /* CONFIG_NFS_V3 */ 386#endif /* CONFIG_NFS_V3 */
387extern const struct file_operations nfs_dir_operations; 387extern const struct file_operations nfs_dir_operations;
388extern struct dentry_operations nfs_dentry_operations; 388extern struct dentry_operations nfs_dentry_operations;
@@ -392,7 +392,7 @@ extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_
392/* 392/*
393 * linux/fs/nfs/symlink.c 393 * linux/fs/nfs/symlink.c
394 */ 394 */
395extern struct inode_operations nfs_symlink_inode_operations; 395extern const struct inode_operations nfs_symlink_inode_operations;
396 396
397/* 397/*
398 * linux/fs/nfs/sysctl.c 398 * linux/fs/nfs/sysctl.c
@@ -409,8 +409,8 @@ extern void nfs_unregister_sysctl(void);
409 * linux/fs/nfs/namespace.c 409 * linux/fs/nfs/namespace.c
410 */ 410 */
411extern struct list_head nfs_automount_list; 411extern struct list_head nfs_automount_list;
412extern struct inode_operations nfs_mountpoint_inode_operations; 412extern const struct inode_operations nfs_mountpoint_inode_operations;
413extern struct inode_operations nfs_referral_inode_operations; 413extern const struct inode_operations nfs_referral_inode_operations;
414extern int nfs_mountpoint_expiry_timeout; 414extern int nfs_mountpoint_expiry_timeout;
415extern void nfs_release_automount_timer(void); 415extern void nfs_release_automount_timer(void);
416 416
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 9ee9da5e1cc9..30d7116d601e 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -767,8 +767,8 @@ struct nfs_access_entry;
767struct nfs_rpc_ops { 767struct nfs_rpc_ops {
768 int version; /* Protocol version */ 768 int version; /* Protocol version */
769 struct dentry_operations *dentry_ops; 769 struct dentry_operations *dentry_ops;
770 struct inode_operations *dir_inode_ops; 770 const struct inode_operations *dir_inode_ops;
771 struct inode_operations *file_inode_ops; 771 const struct inode_operations *file_inode_ops;
772 772
773 int (*getroot) (struct nfs_server *, struct nfs_fh *, 773 int (*getroot) (struct nfs_server *, struct nfs_fh *,
774 struct nfs_fsinfo *); 774 struct nfs_fsinfo *);
diff --git a/include/linux/phonedev.h b/include/linux/phonedev.h
index a0e31adf3abe..4269de99e320 100644
--- a/include/linux/phonedev.h
+++ b/include/linux/phonedev.h
@@ -9,7 +9,7 @@
9 9
10struct phone_device { 10struct phone_device {
11 struct phone_device *next; 11 struct phone_device *next;
12 struct file_operations *f_op; 12 const struct file_operations *f_op;
13 int (*open) (struct phone_device *, struct file *); 13 int (*open) (struct phone_device *, struct file *);
14 int board; /* Device private index */ 14 int board; /* Device private index */
15 int minor; 15 int minor;
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 87dec8fe6de9..2e132473cbe5 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -55,8 +55,8 @@ struct proc_dir_entry {
55 uid_t uid; 55 uid_t uid;
56 gid_t gid; 56 gid_t gid;
57 loff_t size; 57 loff_t size;
58 struct inode_operations * proc_iops; 58 const struct inode_operations *proc_iops;
59 const struct file_operations * proc_fops; 59 const struct file_operations *proc_fops;
60 get_info_t *get_info; 60 get_info_t *get_info;
61 struct module *owner; 61 struct module *owner;
62 struct proc_dir_entry *next, *parent, *subdir; 62 struct proc_dir_entry *next, *parent, *subdir;
diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h
index 0c7ac444fd35..19bc9b8b6191 100644
--- a/include/linux/qnx4_fs.h
+++ b/include/linux/qnx4_fs.h
@@ -116,8 +116,8 @@ extern unsigned long qnx4_block_map(struct inode *inode, long iblock);
116 116
117extern struct buffer_head *qnx4_bread(struct inode *, int, int); 117extern struct buffer_head *qnx4_bread(struct inode *, int, int);
118 118
119extern struct inode_operations qnx4_file_inode_operations; 119extern const struct inode_operations qnx4_file_inode_operations;
120extern struct inode_operations qnx4_dir_inode_operations; 120extern const struct inode_operations qnx4_dir_inode_operations;
121extern const struct file_operations qnx4_file_operations; 121extern const struct file_operations qnx4_file_operations;
122extern const struct file_operations qnx4_dir_operations; 122extern const struct file_operations qnx4_dir_operations;
123extern int qnx4_is_free(struct super_block *sb, long block); 123extern int qnx4_is_free(struct super_block *sb, long block);
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index c3fc6caaad3f..965d5b3ea9eb 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1949,9 +1949,9 @@ int reiserfs_global_version_in_proc(char *buffer, char **start, off_t offset,
1949#endif 1949#endif
1950 1950
1951/* dir.c */ 1951/* dir.c */
1952extern struct inode_operations reiserfs_dir_inode_operations; 1952extern const struct inode_operations reiserfs_dir_inode_operations;
1953extern struct inode_operations reiserfs_symlink_inode_operations; 1953extern const struct inode_operations reiserfs_symlink_inode_operations;
1954extern struct inode_operations reiserfs_special_inode_operations; 1954extern const struct inode_operations reiserfs_special_inode_operations;
1955extern const struct file_operations reiserfs_dir_operations; 1955extern const struct file_operations reiserfs_dir_operations;
1956 1956
1957/* tail_conversion.c */ 1957/* tail_conversion.c */
@@ -1963,7 +1963,7 @@ int indirect2direct(struct reiserfs_transaction_handle *, struct inode *,
1963void reiserfs_unmap_buffer(struct buffer_head *); 1963void reiserfs_unmap_buffer(struct buffer_head *);
1964 1964
1965/* file.c */ 1965/* file.c */
1966extern struct inode_operations reiserfs_file_inode_operations; 1966extern const struct inode_operations reiserfs_file_inode_operations;
1967extern const struct file_operations reiserfs_file_operations; 1967extern const struct file_operations reiserfs_file_operations;
1968extern const struct address_space_operations reiserfs_address_space_operations; 1968extern const struct address_space_operations reiserfs_address_space_operations;
1969 1969
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
index 44c45449065c..dc2e9fe69418 100644
--- a/include/linux/ufs_fs.h
+++ b/include/linux/ufs_fs.h
@@ -957,7 +957,7 @@ extern struct ufs_cg_private_info * ufs_load_cylinder (struct super_block *, uns
957extern void ufs_put_cylinder (struct super_block *, unsigned); 957extern void ufs_put_cylinder (struct super_block *, unsigned);
958 958
959/* dir.c */ 959/* dir.c */
960extern struct inode_operations ufs_dir_inode_operations; 960extern const struct inode_operations ufs_dir_inode_operations;
961extern int ufs_add_link (struct dentry *, struct inode *); 961extern int ufs_add_link (struct dentry *, struct inode *);
962extern ino_t ufs_inode_by_name(struct inode *, struct dentry *); 962extern ino_t ufs_inode_by_name(struct inode *, struct dentry *);
963extern int ufs_make_empty(struct inode *, struct inode *); 963extern int ufs_make_empty(struct inode *, struct inode *);
@@ -969,7 +969,7 @@ extern void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de,
969 struct page *page, struct inode *inode); 969 struct page *page, struct inode *inode);
970 970
971/* file.c */ 971/* file.c */
972extern struct inode_operations ufs_file_inode_operations; 972extern const struct inode_operations ufs_file_inode_operations;
973extern const struct file_operations ufs_file_operations; 973extern const struct file_operations ufs_file_operations;
974 974
975extern const struct address_space_operations ufs_aops; 975extern const struct address_space_operations ufs_aops;
@@ -996,7 +996,7 @@ extern void ufs_error (struct super_block *, const char *, const char *, ...) __
996extern void ufs_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); 996extern void ufs_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4)));
997 997
998/* symlink.c */ 998/* symlink.c */
999extern struct inode_operations ufs_fast_symlink_inode_operations; 999extern const struct inode_operations ufs_fast_symlink_inode_operations;
1000 1000
1001/* truncate.c */ 1001/* truncate.c */
1002extern int ufs_truncate (struct inode *, loff_t); 1002extern int ufs_truncate (struct inode *, loff_t);