Commit c5ef1c42c51b1b5b4a401a6517bdda30933ddbaf
Committed by
Linus Torvalds
1 parent
92e1d5be91
Exists in
master
and in
39 other branches
[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>
Showing 48 changed files with 103 additions and 103 deletions Side-by-side Diff
- fs/proc/base.c
- fs/proc/generic.c
- fs/proc/root.c
- fs/qnx4/dir.c
- fs/qnx4/file.c
- fs/ramfs/file-mmu.c
- fs/ramfs/file-nommu.c
- fs/ramfs/inode.c
- fs/ramfs/internal.h
- fs/reiserfs/file.c
- fs/reiserfs/namei.c
- fs/romfs/inode.c
- fs/smbfs/dir.c
- fs/smbfs/file.c
- fs/smbfs/proto.h
- fs/smbfs/symlink.c
- fs/sysfs/dir.c
- fs/sysfs/inode.c
- fs/sysfs/symlink.c
- fs/sysfs/sysfs.h
- fs/sysv/file.c
- fs/sysv/inode.c
- fs/sysv/namei.c
- fs/sysv/symlink.c
- fs/sysv/sysv.h
- fs/udf/file.c
- fs/udf/namei.c
- fs/udf/udfdecl.h
- fs/ufs/namei.c
- fs/ufs/symlink.c
- fs/ufs/truncate.c
- fs/vfat/namei.c
- fs/xfs/linux-2.6/xfs_iops.c
- fs/xfs/linux-2.6/xfs_iops.h
- include/linux/coda_linux.h
- include/linux/efs_fs.h
- include/linux/ext3_fs.h
- include/linux/ext4_fs.h
- include/linux/fs.h
- include/linux/msdos_fs.h
- include/linux/ncp_fs.h
- include/linux/nfs_fs.h
- include/linux/nfs_xdr.h
- include/linux/phonedev.h
- include/linux/proc_fs.h
- include/linux/qnx4_fs.h
- include/linux/reiserfs_fs.h
- include/linux/ufs_fs.h
fs/proc/base.c
... | ... | @@ -93,7 +93,7 @@ |
93 | 93 | int len; |
94 | 94 | char *name; |
95 | 95 | mode_t mode; |
96 | - struct inode_operations *iop; | |
96 | + const struct inode_operations *iop; | |
97 | 97 | const struct file_operations *fop; |
98 | 98 | union proc_op op; |
99 | 99 | }; |
... | ... | @@ -352,7 +352,7 @@ |
352 | 352 | return error; |
353 | 353 | } |
354 | 354 | |
355 | -static struct inode_operations proc_def_inode_operations = { | |
355 | +static const struct inode_operations proc_def_inode_operations = { | |
356 | 356 | .setattr = proc_setattr, |
357 | 357 | }; |
358 | 358 | |
... | ... | @@ -980,7 +980,7 @@ |
980 | 980 | return error; |
981 | 981 | } |
982 | 982 | |
983 | -static struct inode_operations proc_pid_link_inode_operations = { | |
983 | +static const struct inode_operations proc_pid_link_inode_operations = { | |
984 | 984 | .readlink = proc_pid_readlink, |
985 | 985 | .follow_link = proc_pid_follow_link, |
986 | 986 | .setattr = proc_setattr, |
... | ... | @@ -1416,7 +1416,7 @@ |
1416 | 1416 | /* |
1417 | 1417 | * proc directories can do almost nothing.. |
1418 | 1418 | */ |
1419 | -static struct inode_operations proc_fd_inode_operations = { | |
1419 | +static const struct inode_operations proc_fd_inode_operations = { | |
1420 | 1420 | .lookup = proc_lookupfd, |
1421 | 1421 | .setattr = proc_setattr, |
1422 | 1422 | }; |
... | ... | @@ -1656,7 +1656,7 @@ |
1656 | 1656 | attr_dir_stuff, ARRAY_SIZE(attr_dir_stuff)); |
1657 | 1657 | } |
1658 | 1658 | |
1659 | -static struct inode_operations proc_attr_dir_inode_operations = { | |
1659 | +static const struct inode_operations proc_attr_dir_inode_operations = { | |
1660 | 1660 | .lookup = proc_attr_dir_lookup, |
1661 | 1661 | .getattr = pid_getattr, |
1662 | 1662 | .setattr = proc_setattr, |
... | ... | @@ -1682,7 +1682,7 @@ |
1682 | 1682 | return ERR_PTR(vfs_follow_link(nd,tmp)); |
1683 | 1683 | } |
1684 | 1684 | |
1685 | -static struct inode_operations proc_self_inode_operations = { | |
1685 | +static const struct inode_operations proc_self_inode_operations = { | |
1686 | 1686 | .readlink = proc_self_readlink, |
1687 | 1687 | .follow_link = proc_self_follow_link, |
1688 | 1688 | }; |
... | ... | @@ -1835,7 +1835,7 @@ |
1835 | 1835 | * Thread groups |
1836 | 1836 | */ |
1837 | 1837 | static const struct file_operations proc_task_operations; |
1838 | -static struct inode_operations proc_task_inode_operations; | |
1838 | +static const struct inode_operations proc_task_inode_operations; | |
1839 | 1839 | |
1840 | 1840 | static struct pid_entry tgid_base_stuff[] = { |
1841 | 1841 | DIR("task", S_IRUGO|S_IXUGO, task), |
... | ... | @@ -1904,7 +1904,7 @@ |
1904 | 1904 | tgid_base_stuff, ARRAY_SIZE(tgid_base_stuff)); |
1905 | 1905 | } |
1906 | 1906 | |
1907 | -static struct inode_operations proc_tgid_base_inode_operations = { | |
1907 | +static const struct inode_operations proc_tgid_base_inode_operations = { | |
1908 | 1908 | .lookup = proc_tgid_base_lookup, |
1909 | 1909 | .getattr = pid_getattr, |
1910 | 1910 | .setattr = proc_setattr, |
... | ... | @@ -2182,7 +2182,7 @@ |
2182 | 2182 | .readdir = proc_tid_base_readdir, |
2183 | 2183 | }; |
2184 | 2184 | |
2185 | -static struct inode_operations proc_tid_base_inode_operations = { | |
2185 | +static const struct inode_operations proc_tid_base_inode_operations = { | |
2186 | 2186 | .lookup = proc_tid_base_lookup, |
2187 | 2187 | .getattr = pid_getattr, |
2188 | 2188 | .setattr = proc_setattr, |
... | ... | @@ -2408,7 +2408,7 @@ |
2408 | 2408 | return 0; |
2409 | 2409 | } |
2410 | 2410 | |
2411 | -static struct inode_operations proc_task_inode_operations = { | |
2411 | +static const struct inode_operations proc_task_inode_operations = { | |
2412 | 2412 | .lookup = proc_task_lookup, |
2413 | 2413 | .getattr = proc_task_getattr, |
2414 | 2414 | .setattr = proc_setattr, |
fs/proc/generic.c
... | ... | @@ -265,7 +265,7 @@ |
265 | 265 | return 0; |
266 | 266 | } |
267 | 267 | |
268 | -static struct inode_operations proc_file_inode_operations = { | |
268 | +static const struct inode_operations proc_file_inode_operations = { | |
269 | 269 | .setattr = proc_notify_change, |
270 | 270 | }; |
271 | 271 | |
... | ... | @@ -357,7 +357,7 @@ |
357 | 357 | return NULL; |
358 | 358 | } |
359 | 359 | |
360 | -static struct inode_operations proc_link_inode_operations = { | |
360 | +static const struct inode_operations proc_link_inode_operations = { | |
361 | 361 | .readlink = generic_readlink, |
362 | 362 | .follow_link = proc_follow_link, |
363 | 363 | }; |
... | ... | @@ -505,7 +505,7 @@ |
505 | 505 | /* |
506 | 506 | * proc directories can do almost nothing.. |
507 | 507 | */ |
508 | -static struct inode_operations proc_dir_inode_operations = { | |
508 | +static const struct inode_operations proc_dir_inode_operations = { | |
509 | 509 | .lookup = proc_lookup, |
510 | 510 | .getattr = proc_getattr, |
511 | 511 | .setattr = proc_notify_change, |
fs/proc/root.c
... | ... | @@ -144,7 +144,7 @@ |
144 | 144 | /* |
145 | 145 | * proc root can do almost nothing.. |
146 | 146 | */ |
147 | -static struct inode_operations proc_root_inode_operations = { | |
147 | +static const struct inode_operations proc_root_inode_operations = { | |
148 | 148 | .lookup = proc_root_lookup, |
149 | 149 | .getattr = proc_root_getattr, |
150 | 150 | }; |
fs/qnx4/dir.c
fs/qnx4/file.c
fs/ramfs/file-mmu.c
fs/ramfs/file-nommu.c
fs/ramfs/inode.c
... | ... | @@ -41,7 +41,7 @@ |
41 | 41 | #define RAMFS_MAGIC 0x858458f6 |
42 | 42 | |
43 | 43 | static struct super_operations ramfs_ops; |
44 | -static struct inode_operations ramfs_dir_inode_operations; | |
44 | +static const struct inode_operations ramfs_dir_inode_operations; | |
45 | 45 | |
46 | 46 | static struct backing_dev_info ramfs_backing_dev_info = { |
47 | 47 | .ra_pages = 0, /* No readahead */ |
... | ... | @@ -143,7 +143,7 @@ |
143 | 143 | return error; |
144 | 144 | } |
145 | 145 | |
146 | -static struct inode_operations ramfs_dir_inode_operations = { | |
146 | +static const struct inode_operations ramfs_dir_inode_operations = { | |
147 | 147 | .create = ramfs_create, |
148 | 148 | .lookup = simple_lookup, |
149 | 149 | .link = simple_link, |
fs/ramfs/internal.h
fs/reiserfs/file.c
... | ... | @@ -1556,7 +1556,7 @@ |
1556 | 1556 | .splice_write = generic_file_splice_write, |
1557 | 1557 | }; |
1558 | 1558 | |
1559 | -struct inode_operations reiserfs_file_inode_operations = { | |
1559 | +const struct inode_operations reiserfs_file_inode_operations = { | |
1560 | 1560 | .truncate = reiserfs_vfs_truncate_file, |
1561 | 1561 | .setattr = reiserfs_setattr, |
1562 | 1562 | .setxattr = reiserfs_setxattr, |
fs/reiserfs/namei.c
... | ... | @@ -1525,7 +1525,7 @@ |
1525 | 1525 | /* |
1526 | 1526 | * directories can handle most operations... |
1527 | 1527 | */ |
1528 | -struct inode_operations reiserfs_dir_inode_operations = { | |
1528 | +const struct inode_operations reiserfs_dir_inode_operations = { | |
1529 | 1529 | //&reiserfs_dir_operations, /* default_file_ops */ |
1530 | 1530 | .create = reiserfs_create, |
1531 | 1531 | .lookup = reiserfs_lookup, |
... | ... | @@ -1548,7 +1548,7 @@ |
1548 | 1548 | * symlink operations.. same as page_symlink_inode_operations, with xattr |
1549 | 1549 | * stuff added |
1550 | 1550 | */ |
1551 | -struct inode_operations reiserfs_symlink_inode_operations = { | |
1551 | +const struct inode_operations reiserfs_symlink_inode_operations = { | |
1552 | 1552 | .readlink = generic_readlink, |
1553 | 1553 | .follow_link = page_follow_link_light, |
1554 | 1554 | .put_link = page_put_link, |
... | ... | @@ -1564,7 +1564,7 @@ |
1564 | 1564 | /* |
1565 | 1565 | * special file operations.. just xattr/acl stuff |
1566 | 1566 | */ |
1567 | -struct inode_operations reiserfs_special_inode_operations = { | |
1567 | +const struct inode_operations reiserfs_special_inode_operations = { | |
1568 | 1568 | .setattr = reiserfs_setattr, |
1569 | 1569 | .setxattr = reiserfs_setxattr, |
1570 | 1570 | .getxattr = reiserfs_getxattr, |
fs/romfs/inode.c
fs/smbfs/dir.c
... | ... | @@ -42,7 +42,7 @@ |
42 | 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 | 47 | .create = smb_create, |
48 | 48 | .lookup = smb_lookup, |
... | ... | @@ -54,7 +54,7 @@ |
54 | 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 | 59 | .create = smb_create, |
60 | 60 | .lookup = smb_lookup, |
fs/smbfs/file.c
fs/smbfs/proto.h
... | ... | @@ -36,8 +36,8 @@ |
36 | 36 | extern void smb_install_null_ops(struct smb_ops *ops); |
37 | 37 | /* dir.c */ |
38 | 38 | extern const struct file_operations smb_dir_operations; |
39 | -extern struct inode_operations smb_dir_inode_operations; | |
40 | -extern struct inode_operations smb_dir_inode_operations_unix; | |
39 | +extern const struct inode_operations smb_dir_inode_operations; | |
40 | +extern const struct inode_operations smb_dir_inode_operations_unix; | |
41 | 41 | extern void smb_new_dentry(struct dentry *dentry); |
42 | 42 | extern void smb_renew_times(struct dentry *dentry); |
43 | 43 | /* cache.c */ |
... | ... | @@ -65,7 +65,7 @@ |
65 | 65 | /* file.c */ |
66 | 66 | extern const struct address_space_operations smb_file_aops; |
67 | 67 | extern const struct file_operations smb_file_operations; |
68 | -extern struct inode_operations smb_file_inode_operations; | |
68 | +extern const struct inode_operations smb_file_inode_operations; | |
69 | 69 | /* ioctl.c */ |
70 | 70 | extern int smb_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); |
71 | 71 | /* smbiod.c */ |
... | ... | @@ -84,5 +84,5 @@ |
84 | 84 | extern int smb_request_recv(struct smb_sb_info *server); |
85 | 85 | /* symlink.c */ |
86 | 86 | extern int smb_symlink(struct inode *inode, struct dentry *dentry, const char *oldname); |
87 | -extern struct inode_operations smb_link_inode_operations; | |
87 | +extern const struct inode_operations smb_link_inode_operations; |
fs/smbfs/symlink.c
fs/sysfs/dir.c
fs/sysfs/inode.c
fs/sysfs/symlink.c
... | ... | @@ -181,7 +181,7 @@ |
181 | 181 | free_page((unsigned long)page); |
182 | 182 | } |
183 | 183 | |
184 | -struct inode_operations sysfs_symlink_inode_operations = { | |
184 | +const struct inode_operations sysfs_symlink_inode_operations = { | |
185 | 185 | .readlink = generic_readlink, |
186 | 186 | .follow_link = sysfs_follow_link, |
187 | 187 | .put_link = sysfs_put_link, |
fs/sysfs/sysfs.h
... | ... | @@ -26,8 +26,8 @@ |
26 | 26 | extern const struct file_operations sysfs_dir_operations; |
27 | 27 | extern const struct file_operations sysfs_file_operations; |
28 | 28 | extern const struct file_operations bin_fops; |
29 | -extern struct inode_operations sysfs_dir_inode_operations; | |
30 | -extern struct inode_operations sysfs_symlink_inode_operations; | |
29 | +extern const struct inode_operations sysfs_dir_inode_operations; | |
30 | +extern const struct inode_operations sysfs_symlink_inode_operations; | |
31 | 31 | |
32 | 32 | struct sysfs_symlink { |
33 | 33 | char * link_name; |
fs/sysv/file.c
fs/sysv/inode.c
... | ... | @@ -142,7 +142,7 @@ |
142 | 142 | } |
143 | 143 | } |
144 | 144 | |
145 | -static struct inode_operations sysv_symlink_inode_operations = { | |
145 | +static const struct inode_operations sysv_symlink_inode_operations = { | |
146 | 146 | .readlink = generic_readlink, |
147 | 147 | .follow_link = page_follow_link_light, |
148 | 148 | .put_link = page_put_link, |
fs/sysv/namei.c
... | ... | @@ -292,7 +292,7 @@ |
292 | 292 | /* |
293 | 293 | * directories can handle most operations... |
294 | 294 | */ |
295 | -struct inode_operations sysv_dir_inode_operations = { | |
295 | +const struct inode_operations sysv_dir_inode_operations = { | |
296 | 296 | .create = sysv_create, |
297 | 297 | .lookup = sysv_lookup, |
298 | 298 | .link = sysv_link, |
fs/sysv/symlink.c
fs/sysv/sysv.h
... | ... | @@ -159,9 +159,9 @@ |
159 | 159 | extern ino_t sysv_inode_by_name(struct dentry *); |
160 | 160 | |
161 | 161 | |
162 | -extern struct inode_operations sysv_file_inode_operations; | |
163 | -extern struct inode_operations sysv_dir_inode_operations; | |
164 | -extern struct inode_operations sysv_fast_symlink_inode_operations; | |
162 | +extern const struct inode_operations sysv_file_inode_operations; | |
163 | +extern const struct inode_operations sysv_dir_inode_operations; | |
164 | +extern const struct inode_operations sysv_fast_symlink_inode_operations; | |
165 | 165 | extern const struct file_operations sysv_file_operations; |
166 | 166 | extern const struct file_operations sysv_dir_operations; |
167 | 167 | extern const struct address_space_operations sysv_aops; |
fs/udf/file.c
fs/udf/namei.c
fs/udf/udfdecl.h
... | ... | @@ -42,9 +42,9 @@ |
42 | 42 | struct buffer_head; |
43 | 43 | struct super_block; |
44 | 44 | |
45 | -extern struct inode_operations udf_dir_inode_operations; | |
45 | +extern const struct inode_operations udf_dir_inode_operations; | |
46 | 46 | extern const struct file_operations udf_dir_operations; |
47 | -extern struct inode_operations udf_file_inode_operations; | |
47 | +extern const struct inode_operations udf_file_inode_operations; | |
48 | 48 | extern const struct file_operations udf_file_operations; |
49 | 49 | extern const struct address_space_operations udf_aops; |
50 | 50 | extern const struct address_space_operations udf_adinicb_aops; |
fs/ufs/namei.c
fs/ufs/symlink.c
fs/ufs/truncate.c
fs/vfat/namei.c
... | ... | @@ -996,7 +996,7 @@ |
996 | 996 | goto out; |
997 | 997 | } |
998 | 998 | |
999 | -static struct inode_operations vfat_dir_inode_operations = { | |
999 | +static const struct inode_operations vfat_dir_inode_operations = { | |
1000 | 1000 | .create = vfat_create, |
1001 | 1001 | .lookup = vfat_lookup, |
1002 | 1002 | .unlink = vfat_unlink, |
fs/xfs/linux-2.6/xfs_iops.c
... | ... | @@ -813,7 +813,7 @@ |
813 | 813 | } |
814 | 814 | |
815 | 815 | |
816 | -struct inode_operations xfs_inode_operations = { | |
816 | +const struct inode_operations xfs_inode_operations = { | |
817 | 817 | .permission = xfs_vn_permission, |
818 | 818 | .truncate = xfs_vn_truncate, |
819 | 819 | .getattr = xfs_vn_getattr, |
... | ... | @@ -824,7 +824,7 @@ |
824 | 824 | .removexattr = xfs_vn_removexattr, |
825 | 825 | }; |
826 | 826 | |
827 | -struct inode_operations xfs_dir_inode_operations = { | |
827 | +const struct inode_operations xfs_dir_inode_operations = { | |
828 | 828 | .create = xfs_vn_create, |
829 | 829 | .lookup = xfs_vn_lookup, |
830 | 830 | .link = xfs_vn_link, |
... | ... | @@ -843,7 +843,7 @@ |
843 | 843 | .removexattr = xfs_vn_removexattr, |
844 | 844 | }; |
845 | 845 | |
846 | -struct inode_operations xfs_symlink_inode_operations = { | |
846 | +const struct inode_operations xfs_symlink_inode_operations = { | |
847 | 847 | .readlink = generic_readlink, |
848 | 848 | .follow_link = xfs_vn_follow_link, |
849 | 849 | .put_link = xfs_vn_put_link, |
fs/xfs/linux-2.6/xfs_iops.h
... | ... | @@ -18,9 +18,9 @@ |
18 | 18 | #ifndef __XFS_IOPS_H__ |
19 | 19 | #define __XFS_IOPS_H__ |
20 | 20 | |
21 | -extern struct inode_operations xfs_inode_operations; | |
22 | -extern struct inode_operations xfs_dir_inode_operations; | |
23 | -extern struct inode_operations xfs_symlink_inode_operations; | |
21 | +extern const struct inode_operations xfs_inode_operations; | |
22 | +extern const struct inode_operations xfs_dir_inode_operations; | |
23 | +extern const struct inode_operations xfs_symlink_inode_operations; | |
24 | 24 | |
25 | 25 | extern const struct file_operations xfs_file_operations; |
26 | 26 | extern const struct file_operations xfs_dir_file_operations; |
include/linux/coda_linux.h
... | ... | @@ -23,9 +23,9 @@ |
23 | 23 | #include <linux/coda_fs_i.h> |
24 | 24 | |
25 | 25 | /* operations */ |
26 | -extern struct inode_operations coda_dir_inode_operations; | |
27 | -extern struct inode_operations coda_file_inode_operations; | |
28 | -extern struct inode_operations coda_ioctl_inode_operations; | |
26 | +extern const struct inode_operations coda_dir_inode_operations; | |
27 | +extern const struct inode_operations coda_file_inode_operations; | |
28 | +extern const struct inode_operations coda_ioctl_inode_operations; | |
29 | 29 | |
30 | 30 | extern const struct address_space_operations coda_file_aops; |
31 | 31 | extern const struct address_space_operations coda_symlink_aops; |
include/linux/efs_fs.h
... | ... | @@ -36,7 +36,7 @@ |
36 | 36 | |
37 | 37 | struct statfs; |
38 | 38 | |
39 | -extern struct inode_operations efs_dir_inode_operations; | |
39 | +extern const struct inode_operations efs_dir_inode_operations; | |
40 | 40 | extern const struct file_operations efs_dir_operations; |
41 | 41 | extern const struct address_space_operations efs_symlink_aops; |
42 | 42 |
include/linux/ext3_fs.h
... | ... | @@ -868,16 +868,16 @@ |
868 | 868 | extern const struct file_operations ext3_dir_operations; |
869 | 869 | |
870 | 870 | /* file.c */ |
871 | -extern struct inode_operations ext3_file_inode_operations; | |
871 | +extern const struct inode_operations ext3_file_inode_operations; | |
872 | 872 | extern const struct file_operations ext3_file_operations; |
873 | 873 | |
874 | 874 | /* namei.c */ |
875 | -extern struct inode_operations ext3_dir_inode_operations; | |
876 | -extern struct inode_operations ext3_special_inode_operations; | |
875 | +extern const struct inode_operations ext3_dir_inode_operations; | |
876 | +extern const struct inode_operations ext3_special_inode_operations; | |
877 | 877 | |
878 | 878 | /* symlink.c */ |
879 | -extern struct inode_operations ext3_symlink_inode_operations; | |
880 | -extern struct inode_operations ext3_fast_symlink_inode_operations; | |
879 | +extern const struct inode_operations ext3_symlink_inode_operations; | |
880 | +extern const struct inode_operations ext3_fast_symlink_inode_operations; | |
881 | 881 | |
882 | 882 | |
883 | 883 | #endif /* __KERNEL__ */ |
include/linux/ext4_fs.h
... | ... | @@ -955,16 +955,16 @@ |
955 | 955 | extern const struct file_operations ext4_dir_operations; |
956 | 956 | |
957 | 957 | /* file.c */ |
958 | -extern struct inode_operations ext4_file_inode_operations; | |
958 | +extern const struct inode_operations ext4_file_inode_operations; | |
959 | 959 | extern const struct file_operations ext4_file_operations; |
960 | 960 | |
961 | 961 | /* namei.c */ |
962 | -extern struct inode_operations ext4_dir_inode_operations; | |
963 | -extern struct inode_operations ext4_special_inode_operations; | |
962 | +extern const struct inode_operations ext4_dir_inode_operations; | |
963 | +extern const struct inode_operations ext4_special_inode_operations; | |
964 | 964 | |
965 | 965 | /* symlink.c */ |
966 | -extern struct inode_operations ext4_symlink_inode_operations; | |
967 | -extern struct inode_operations ext4_fast_symlink_inode_operations; | |
966 | +extern const struct inode_operations ext4_symlink_inode_operations; | |
967 | +extern const struct inode_operations ext4_fast_symlink_inode_operations; | |
968 | 968 | |
969 | 969 | /* extents.c */ |
970 | 970 | extern int ext4_ext_tree_init(handle_t *handle, struct inode *); |
include/linux/fs.h
... | ... | @@ -551,7 +551,7 @@ |
551 | 551 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ |
552 | 552 | struct mutex i_mutex; |
553 | 553 | struct rw_semaphore i_alloc_sem; |
554 | - struct inode_operations *i_op; | |
554 | + const struct inode_operations *i_op; | |
555 | 555 | const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ |
556 | 556 | struct super_block *i_sb; |
557 | 557 | struct file_lock *i_flock; |
... | ... | @@ -1828,7 +1828,7 @@ |
1828 | 1828 | extern int __page_symlink(struct inode *inode, const char *symname, int len, |
1829 | 1829 | gfp_t gfp_mask); |
1830 | 1830 | extern int page_symlink(struct inode *inode, const char *symname, int len); |
1831 | -extern struct inode_operations page_symlink_inode_operations; | |
1831 | +extern const struct inode_operations page_symlink_inode_operations; | |
1832 | 1832 | extern int generic_readlink(struct dentry *, char __user *, int); |
1833 | 1833 | extern void generic_fillattr(struct inode *, struct kstat *); |
1834 | 1834 | extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); |
... | ... | @@ -1873,7 +1873,7 @@ |
1873 | 1873 | extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); |
1874 | 1874 | extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); |
1875 | 1875 | extern const struct file_operations simple_dir_operations; |
1876 | -extern struct inode_operations simple_dir_inode_operations; | |
1876 | +extern const struct inode_operations simple_dir_inode_operations; | |
1877 | 1877 | struct tree_descr { char *name; const struct file_operations *ops; int mode; }; |
1878 | 1878 | struct dentry *d_alloc_name(struct dentry *, const char *); |
1879 | 1879 | extern int simple_fill_super(struct super_block *, int, struct tree_descr *); |
include/linux/msdos_fs.h
... | ... | @@ -234,7 +234,7 @@ |
234 | 234 | struct fat_mount_options options; |
235 | 235 | struct nls_table *nls_disk; /* Codepage used on disk */ |
236 | 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 | 238 | int dir_per_block; /* dir entries per block */ |
239 | 239 | int dir_per_block_bits; /* log2(dir_per_block) */ |
240 | 240 | |
... | ... | @@ -399,7 +399,7 @@ |
399 | 399 | extern int fat_generic_ioctl(struct inode *inode, struct file *filp, |
400 | 400 | unsigned int cmd, unsigned long arg); |
401 | 401 | extern const struct file_operations fat_file_operations; |
402 | -extern struct inode_operations fat_file_inode_operations; | |
402 | +extern const struct inode_operations fat_file_inode_operations; | |
403 | 403 | extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); |
404 | 404 | extern void fat_truncate(struct inode *inode); |
405 | 405 | extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, |
... | ... | @@ -413,7 +413,7 @@ |
413 | 413 | struct msdos_dir_entry *de, loff_t i_pos); |
414 | 414 | extern int fat_sync_inode(struct inode *inode); |
415 | 415 | extern 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 | |
418 | 418 | extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, |
419 | 419 | struct inode *i2); |
include/linux/ncp_fs.h
... | ... | @@ -204,7 +204,7 @@ |
204 | 204 | void ncp_update_inode2(struct inode *, struct ncp_entry_info *); |
205 | 205 | |
206 | 206 | /* linux/fs/ncpfs/dir.c */ |
207 | -extern struct inode_operations ncp_dir_inode_operations; | |
207 | +extern const struct inode_operations ncp_dir_inode_operations; | |
208 | 208 | extern const struct file_operations ncp_dir_operations; |
209 | 209 | int ncp_conn_logged_in(struct super_block *); |
210 | 210 | int ncp_date_dos2unix(__le16 time, __le16 date); |
... | ... | @@ -226,7 +226,7 @@ |
226 | 226 | void ncp_unlock_server(struct ncp_server *server); |
227 | 227 | |
228 | 228 | /* linux/fs/ncpfs/file.c */ |
229 | -extern struct inode_operations ncp_file_inode_operations; | |
229 | +extern const struct inode_operations ncp_file_inode_operations; | |
230 | 230 | extern const struct file_operations ncp_file_operations; |
231 | 231 | int ncp_make_open(struct inode *, int); |
232 | 232 |
include/linux/nfs_fs.h
... | ... | @@ -331,9 +331,9 @@ |
331 | 331 | /* |
332 | 332 | * linux/fs/nfs/file.c |
333 | 333 | */ |
334 | -extern struct inode_operations nfs_file_inode_operations; | |
334 | +extern const struct inode_operations nfs_file_inode_operations; | |
335 | 335 | #ifdef CONFIG_NFS_V3 |
336 | -extern struct inode_operations nfs3_file_inode_operations; | |
336 | +extern const struct inode_operations nfs3_file_inode_operations; | |
337 | 337 | #endif /* CONFIG_NFS_V3 */ |
338 | 338 | extern const struct file_operations nfs_file_operations; |
339 | 339 | extern const struct address_space_operations nfs_file_aops; |
340 | 340 | |
... | ... | @@ -380,9 +380,9 @@ |
380 | 380 | /* |
381 | 381 | * linux/fs/nfs/dir.c |
382 | 382 | */ |
383 | -extern struct inode_operations nfs_dir_inode_operations; | |
383 | +extern const struct inode_operations nfs_dir_inode_operations; | |
384 | 384 | #ifdef CONFIG_NFS_V3 |
385 | -extern struct inode_operations nfs3_dir_inode_operations; | |
385 | +extern const struct inode_operations nfs3_dir_inode_operations; | |
386 | 386 | #endif /* CONFIG_NFS_V3 */ |
387 | 387 | extern const struct file_operations nfs_dir_operations; |
388 | 388 | extern struct dentry_operations nfs_dentry_operations; |
... | ... | @@ -392,7 +392,7 @@ |
392 | 392 | /* |
393 | 393 | * linux/fs/nfs/symlink.c |
394 | 394 | */ |
395 | -extern struct inode_operations nfs_symlink_inode_operations; | |
395 | +extern const struct inode_operations nfs_symlink_inode_operations; | |
396 | 396 | |
397 | 397 | /* |
398 | 398 | * linux/fs/nfs/sysctl.c |
... | ... | @@ -409,8 +409,8 @@ |
409 | 409 | * linux/fs/nfs/namespace.c |
410 | 410 | */ |
411 | 411 | extern struct list_head nfs_automount_list; |
412 | -extern struct inode_operations nfs_mountpoint_inode_operations; | |
413 | -extern struct inode_operations nfs_referral_inode_operations; | |
412 | +extern const struct inode_operations nfs_mountpoint_inode_operations; | |
413 | +extern const struct inode_operations nfs_referral_inode_operations; | |
414 | 414 | extern int nfs_mountpoint_expiry_timeout; |
415 | 415 | extern void nfs_release_automount_timer(void); |
416 | 416 |
include/linux/nfs_xdr.h
... | ... | @@ -767,8 +767,8 @@ |
767 | 767 | struct nfs_rpc_ops { |
768 | 768 | int version; /* Protocol version */ |
769 | 769 | struct dentry_operations *dentry_ops; |
770 | - struct inode_operations *dir_inode_ops; | |
771 | - struct inode_operations *file_inode_ops; | |
770 | + const struct inode_operations *dir_inode_ops; | |
771 | + const struct inode_operations *file_inode_ops; | |
772 | 772 | |
773 | 773 | int (*getroot) (struct nfs_server *, struct nfs_fh *, |
774 | 774 | struct nfs_fsinfo *); |
include/linux/phonedev.h
include/linux/proc_fs.h
... | ... | @@ -55,8 +55,8 @@ |
55 | 55 | uid_t uid; |
56 | 56 | gid_t gid; |
57 | 57 | loff_t size; |
58 | - struct inode_operations * proc_iops; | |
59 | - const struct file_operations * proc_fops; | |
58 | + const struct inode_operations *proc_iops; | |
59 | + const struct file_operations *proc_fops; | |
60 | 60 | get_info_t *get_info; |
61 | 61 | struct module *owner; |
62 | 62 | struct proc_dir_entry *next, *parent, *subdir; |
include/linux/qnx4_fs.h
... | ... | @@ -116,8 +116,8 @@ |
116 | 116 | |
117 | 117 | extern struct buffer_head *qnx4_bread(struct inode *, int, int); |
118 | 118 | |
119 | -extern struct inode_operations qnx4_file_inode_operations; | |
120 | -extern struct inode_operations qnx4_dir_inode_operations; | |
119 | +extern const struct inode_operations qnx4_file_inode_operations; | |
120 | +extern const struct inode_operations qnx4_dir_inode_operations; | |
121 | 121 | extern const struct file_operations qnx4_file_operations; |
122 | 122 | extern const struct file_operations qnx4_dir_operations; |
123 | 123 | extern int qnx4_is_free(struct super_block *sb, long block); |
include/linux/reiserfs_fs.h
... | ... | @@ -1949,9 +1949,9 @@ |
1949 | 1949 | #endif |
1950 | 1950 | |
1951 | 1951 | /* dir.c */ |
1952 | -extern struct inode_operations reiserfs_dir_inode_operations; | |
1953 | -extern struct inode_operations reiserfs_symlink_inode_operations; | |
1954 | -extern struct inode_operations reiserfs_special_inode_operations; | |
1952 | +extern const struct inode_operations reiserfs_dir_inode_operations; | |
1953 | +extern const struct inode_operations reiserfs_symlink_inode_operations; | |
1954 | +extern const struct inode_operations reiserfs_special_inode_operations; | |
1955 | 1955 | extern const struct file_operations reiserfs_dir_operations; |
1956 | 1956 | |
1957 | 1957 | /* tail_conversion.c */ |
... | ... | @@ -1963,7 +1963,7 @@ |
1963 | 1963 | void reiserfs_unmap_buffer(struct buffer_head *); |
1964 | 1964 | |
1965 | 1965 | /* file.c */ |
1966 | -extern struct inode_operations reiserfs_file_inode_operations; | |
1966 | +extern const struct inode_operations reiserfs_file_inode_operations; | |
1967 | 1967 | extern const struct file_operations reiserfs_file_operations; |
1968 | 1968 | extern const struct address_space_operations reiserfs_address_space_operations; |
1969 | 1969 |
include/linux/ufs_fs.h
... | ... | @@ -957,7 +957,7 @@ |
957 | 957 | extern void ufs_put_cylinder (struct super_block *, unsigned); |
958 | 958 | |
959 | 959 | /* dir.c */ |
960 | -extern struct inode_operations ufs_dir_inode_operations; | |
960 | +extern const struct inode_operations ufs_dir_inode_operations; | |
961 | 961 | extern int ufs_add_link (struct dentry *, struct inode *); |
962 | 962 | extern ino_t ufs_inode_by_name(struct inode *, struct dentry *); |
963 | 963 | extern int ufs_make_empty(struct inode *, struct inode *); |
... | ... | @@ -969,7 +969,7 @@ |
969 | 969 | struct page *page, struct inode *inode); |
970 | 970 | |
971 | 971 | /* file.c */ |
972 | -extern struct inode_operations ufs_file_inode_operations; | |
972 | +extern const struct inode_operations ufs_file_inode_operations; | |
973 | 973 | extern const struct file_operations ufs_file_operations; |
974 | 974 | |
975 | 975 | extern const struct address_space_operations ufs_aops; |
... | ... | @@ -996,7 +996,7 @@ |
996 | 996 | extern void ufs_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); |
997 | 997 | |
998 | 998 | /* symlink.c */ |
999 | -extern struct inode_operations ufs_fast_symlink_inode_operations; | |
999 | +extern const struct inode_operations ufs_fast_symlink_inode_operations; | |
1000 | 1000 | |
1001 | 1001 | /* truncate.c */ |
1002 | 1002 | extern int ufs_truncate (struct inode *, loff_t); |