Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] mark struct inode_operations const 1

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>

authored by

Arjan van de Ven and committed by
Linus Torvalds
754661f1 9c2e08c5

+100 -100
+1 -1
arch/powerpc/platforms/cell/spufs/inode.c
··· 220 220 return dcache_dir_close(inode, file); 221 221 } 222 222 223 - struct inode_operations spufs_dir_inode_operations = { 223 + const struct inode_operations spufs_dir_inode_operations = { 224 224 .lookup = simple_lookup, 225 225 }; 226 226
+8 -8
fs/9p/vfs_inode.c
··· 41 41 #include "v9fs_vfs.h" 42 42 #include "fid.h" 43 43 44 - static struct inode_operations v9fs_dir_inode_operations; 45 - static struct inode_operations v9fs_dir_inode_operations_ext; 46 - static struct inode_operations v9fs_file_inode_operations; 47 - static struct inode_operations v9fs_symlink_inode_operations; 44 + static const struct inode_operations v9fs_dir_inode_operations; 45 + static const struct inode_operations v9fs_dir_inode_operations_ext; 46 + static const struct inode_operations v9fs_file_inode_operations; 47 + static const struct inode_operations v9fs_symlink_inode_operations; 48 48 49 49 /** 50 50 * unixmode2p9mode - convert unix mode bits to plan 9 ··· 1303 1303 return retval; 1304 1304 } 1305 1305 1306 - static struct inode_operations v9fs_dir_inode_operations_ext = { 1306 + static const struct inode_operations v9fs_dir_inode_operations_ext = { 1307 1307 .create = v9fs_vfs_create, 1308 1308 .lookup = v9fs_vfs_lookup, 1309 1309 .symlink = v9fs_vfs_symlink, ··· 1318 1318 .setattr = v9fs_vfs_setattr, 1319 1319 }; 1320 1320 1321 - static struct inode_operations v9fs_dir_inode_operations = { 1321 + static const struct inode_operations v9fs_dir_inode_operations = { 1322 1322 .create = v9fs_vfs_create, 1323 1323 .lookup = v9fs_vfs_lookup, 1324 1324 .unlink = v9fs_vfs_unlink, ··· 1330 1330 .setattr = v9fs_vfs_setattr, 1331 1331 }; 1332 1332 1333 - static struct inode_operations v9fs_file_inode_operations = { 1333 + static const struct inode_operations v9fs_file_inode_operations = { 1334 1334 .getattr = v9fs_vfs_getattr, 1335 1335 .setattr = v9fs_vfs_setattr, 1336 1336 }; 1337 1337 1338 - static struct inode_operations v9fs_symlink_inode_operations = { 1338 + static const struct inode_operations v9fs_symlink_inode_operations = { 1339 1339 .readlink = v9fs_vfs_readlink, 1340 1340 .follow_link = v9fs_vfs_follow_link, 1341 1341 .put_link = v9fs_vfs_put_link,
+2 -2
fs/adfs/adfs.h
··· 84 84 */ 85 85 86 86 /* dir_*.c */ 87 - extern struct inode_operations adfs_dir_inode_operations; 87 + extern const struct inode_operations adfs_dir_inode_operations; 88 88 extern const struct file_operations adfs_dir_operations; 89 89 extern struct dentry_operations adfs_dentry_operations; 90 90 extern struct adfs_dir_ops adfs_f_dir_ops; ··· 93 93 extern int adfs_dir_update(struct super_block *sb, struct object_info *obj); 94 94 95 95 /* file.c */ 96 - extern struct inode_operations adfs_file_inode_operations; 96 + extern const struct inode_operations adfs_file_inode_operations; 97 97 extern const struct file_operations adfs_file_operations; 98 98 99 99 static inline __u32 signed_asl(__u32 val, signed int shift)
+1 -1
fs/adfs/dir.c
··· 295 295 /* 296 296 * directories can handle most operations... 297 297 */ 298 - struct inode_operations adfs_dir_inode_operations = { 298 + const struct inode_operations adfs_dir_inode_operations = { 299 299 .lookup = adfs_lookup, 300 300 .setattr = adfs_notify_change, 301 301 };
+1 -1
fs/adfs/file.c
··· 36 36 .sendfile = generic_file_sendfile, 37 37 }; 38 38 39 - struct inode_operations adfs_file_inode_operations = { 39 + const struct inode_operations adfs_file_inode_operations = { 40 40 .setattr = adfs_notify_change, 41 41 };
+3 -3
fs/affs/affs.h
··· 188 188 189 189 /* jump tables */ 190 190 191 - extern struct inode_operations affs_file_inode_operations; 192 - extern struct inode_operations affs_dir_inode_operations; 193 - extern struct inode_operations affs_symlink_inode_operations; 191 + extern const struct inode_operations affs_file_inode_operations; 192 + extern const struct inode_operations affs_dir_inode_operations; 193 + extern const struct inode_operations affs_symlink_inode_operations; 194 194 extern const struct file_operations affs_file_operations; 195 195 extern const struct file_operations affs_file_operations_ofs; 196 196 extern const struct file_operations affs_dir_operations;
+1 -1
fs/affs/dir.c
··· 26 26 /* 27 27 * directories can handle most operations... 28 28 */ 29 - struct inode_operations affs_dir_inode_operations = { 29 + const struct inode_operations affs_dir_inode_operations = { 30 30 .create = affs_create, 31 31 .lookup = affs_lookup, 32 32 .link = affs_link,
+1 -1
fs/affs/file.c
··· 38 38 .sendfile = generic_file_sendfile, 39 39 }; 40 40 41 - struct inode_operations affs_file_inode_operations = { 41 + const struct inode_operations affs_file_inode_operations = { 42 42 .truncate = affs_truncate, 43 43 .setattr = affs_notify_change, 44 44 };
+1 -1
fs/affs/inode.c
··· 12 12 13 13 #include "affs.h" 14 14 15 - extern struct inode_operations affs_symlink_inode_operations; 15 + extern const struct inode_operations affs_symlink_inode_operations; 16 16 extern struct timezone sys_tz; 17 17 18 18 void
+1 -1
fs/affs/symlink.c
··· 70 70 .readpage = affs_symlink_readpage, 71 71 }; 72 72 73 - struct inode_operations affs_symlink_inode_operations = { 73 + const struct inode_operations affs_symlink_inode_operations = { 74 74 .readlink = generic_readlink, 75 75 .follow_link = page_follow_link_light, 76 76 .put_link = page_put_link,
+1 -1
fs/afs/dir.c
··· 37 37 .readdir = afs_dir_readdir, 38 38 }; 39 39 40 - struct inode_operations afs_dir_inode_operations = { 40 + const struct inode_operations afs_dir_inode_operations = { 41 41 .lookup = afs_dir_lookup, 42 42 .getattr = afs_inode_getattr, 43 43 #if 0 /* TODO */
+1 -1
fs/afs/file.c
··· 30 30 static void afs_file_invalidatepage(struct page *page, unsigned long offset); 31 31 static int afs_file_releasepage(struct page *page, gfp_t gfp_flags); 32 32 33 - struct inode_operations afs_file_inode_operations = { 33 + const struct inode_operations afs_file_inode_operations = { 34 34 .getattr = afs_inode_getattr, 35 35 }; 36 36
+3 -3
fs/afs/internal.h
··· 63 63 /* 64 64 * dir.c 65 65 */ 66 - extern struct inode_operations afs_dir_inode_operations; 66 + extern const struct inode_operations afs_dir_inode_operations; 67 67 extern const struct file_operations afs_dir_file_operations; 68 68 69 69 /* 70 70 * file.c 71 71 */ 72 72 extern const struct address_space_operations afs_fs_aops; 73 - extern struct inode_operations afs_file_inode_operations; 73 + extern const struct inode_operations afs_file_inode_operations; 74 74 75 75 #ifdef AFS_CACHING_SUPPORT 76 76 extern int afs_cache_get_page_cookie(struct page *page, ··· 104 104 /* 105 105 * mntpt.c 106 106 */ 107 - extern struct inode_operations afs_mntpt_inode_operations; 107 + extern const struct inode_operations afs_mntpt_inode_operations; 108 108 extern const struct file_operations afs_mntpt_file_operations; 109 109 extern struct afs_timer afs_mntpt_expiry_timer; 110 110 extern struct afs_timer_ops afs_mntpt_expiry_timer_ops;
+1 -1
fs/afs/mntpt.c
··· 36 36 .open = afs_mntpt_open, 37 37 }; 38 38 39 - struct inode_operations afs_mntpt_inode_operations = { 39 + const struct inode_operations afs_mntpt_inode_operations = { 40 40 .lookup = afs_mntpt_lookup, 41 41 .follow_link = afs_mntpt_follow_link, 42 42 .readlink = page_readlink,
+2 -2
fs/autofs/autofs_i.h
··· 142 142 143 143 /* Operations structures */ 144 144 145 - extern struct inode_operations autofs_root_inode_operations; 146 - extern struct inode_operations autofs_symlink_inode_operations; 145 + extern const struct inode_operations autofs_root_inode_operations; 146 + extern const struct inode_operations autofs_symlink_inode_operations; 147 147 extern const struct file_operations autofs_root_operations; 148 148 149 149 /* Initializing function */
+1 -1
fs/autofs/root.c
··· 32 32 .ioctl = autofs_root_ioctl, 33 33 }; 34 34 35 - struct inode_operations autofs_root_inode_operations = { 35 + const struct inode_operations autofs_root_inode_operations = { 36 36 .lookup = autofs_root_lookup, 37 37 .unlink = autofs_root_unlink, 38 38 .symlink = autofs_root_symlink,
+1 -1
fs/autofs/symlink.c
··· 20 20 return NULL; 21 21 } 22 22 23 - struct inode_operations autofs_symlink_inode_operations = { 23 + const struct inode_operations autofs_symlink_inode_operations = { 24 24 .readlink = generic_readlink, 25 25 .follow_link = autofs_follow_link 26 26 };
+5 -5
fs/autofs4/autofs_i.h
··· 168 168 169 169 /* Operations structures */ 170 170 171 - extern struct inode_operations autofs4_symlink_inode_operations; 172 - extern struct inode_operations autofs4_dir_inode_operations; 173 - extern struct inode_operations autofs4_root_inode_operations; 174 - extern struct inode_operations autofs4_indirect_root_inode_operations; 175 - extern struct inode_operations autofs4_direct_root_inode_operations; 171 + extern const struct inode_operations autofs4_symlink_inode_operations; 172 + extern const struct inode_operations autofs4_dir_inode_operations; 173 + extern const struct inode_operations autofs4_root_inode_operations; 174 + extern const struct inode_operations autofs4_indirect_root_inode_operations; 175 + extern const struct inode_operations autofs4_direct_root_inode_operations; 176 176 extern const struct file_operations autofs4_dir_operations; 177 177 extern const struct file_operations autofs4_root_operations; 178 178
+3 -3
fs/autofs4/root.c
··· 47 47 .readdir = autofs4_dir_readdir, 48 48 }; 49 49 50 - struct inode_operations autofs4_indirect_root_inode_operations = { 50 + const struct inode_operations autofs4_indirect_root_inode_operations = { 51 51 .lookup = autofs4_lookup, 52 52 .unlink = autofs4_dir_unlink, 53 53 .symlink = autofs4_dir_symlink, ··· 55 55 .rmdir = autofs4_dir_rmdir, 56 56 }; 57 57 58 - struct inode_operations autofs4_direct_root_inode_operations = { 58 + const struct inode_operations autofs4_direct_root_inode_operations = { 59 59 .lookup = autofs4_lookup, 60 60 .unlink = autofs4_dir_unlink, 61 61 .mkdir = autofs4_dir_mkdir, ··· 63 63 .follow_link = autofs4_follow_link, 64 64 }; 65 65 66 - struct inode_operations autofs4_dir_inode_operations = { 66 + const struct inode_operations autofs4_dir_inode_operations = { 67 67 .lookup = autofs4_lookup, 68 68 .unlink = autofs4_dir_unlink, 69 69 .symlink = autofs4_dir_symlink,
+1 -1
fs/autofs4/symlink.c
··· 19 19 return NULL; 20 20 } 21 21 22 - struct inode_operations autofs4_symlink_inode_operations = { 22 + const struct inode_operations autofs4_symlink_inode_operations = { 23 23 .readlink = generic_readlink, 24 24 .follow_link = autofs4_follow_link 25 25 };
+1 -1
fs/bad_inode.c
··· 291 291 return -EIO; 292 292 } 293 293 294 - static struct inode_operations bad_inode_ops = 294 + static const struct inode_operations bad_inode_ops = 295 295 { 296 296 .create = bad_inode_create, 297 297 .lookup = bad_inode_lookup,
+2 -2
fs/befs/linuxvfs.c
··· 68 68 .readdir = befs_readdir, 69 69 }; 70 70 71 - static struct inode_operations befs_dir_inode_operations = { 71 + static const struct inode_operations befs_dir_inode_operations = { 72 72 .lookup = befs_lookup, 73 73 }; 74 74 ··· 78 78 .bmap = befs_bmap, 79 79 }; 80 80 81 - static struct inode_operations befs_symlink_inode_operations = { 81 + static const struct inode_operations befs_symlink_inode_operations = { 82 82 .readlink = generic_readlink, 83 83 .follow_link = befs_follow_link, 84 84 .put_link = befs_put_link,
+2 -2
fs/bfs/bfs.h
··· 48 48 49 49 50 50 /* file.c */ 51 - extern struct inode_operations bfs_file_inops; 51 + extern const struct inode_operations bfs_file_inops; 52 52 extern const struct file_operations bfs_file_operations; 53 53 extern const struct address_space_operations bfs_aops; 54 54 55 55 /* dir.c */ 56 - extern struct inode_operations bfs_dir_inops; 56 + extern const struct inode_operations bfs_dir_inops; 57 57 extern const struct file_operations bfs_dir_operations; 58 58 59 59 #endif /* _FS_BFS_BFS_H */
+1 -1
fs/bfs/dir.c
··· 260 260 return error; 261 261 } 262 262 263 - struct inode_operations bfs_dir_inops = { 263 + const struct inode_operations bfs_dir_inops = { 264 264 .create = bfs_create, 265 265 .lookup = bfs_lookup, 266 266 .link = bfs_link,
+1 -1
fs/bfs/file.c
··· 164 164 .bmap = bfs_bmap, 165 165 }; 166 166 167 - struct inode_operations bfs_file_inops; 167 + const struct inode_operations bfs_file_inops;
+3 -3
fs/cifs/cifsfs.c
··· 533 533 .kill_sb = kill_anon_super, 534 534 /* .fs_flags */ 535 535 }; 536 - struct inode_operations cifs_dir_inode_ops = { 536 + const struct inode_operations cifs_dir_inode_ops = { 537 537 .create = cifs_create, 538 538 .lookup = cifs_lookup, 539 539 .getattr = cifs_getattr, ··· 555 555 #endif 556 556 }; 557 557 558 - struct inode_operations cifs_file_inode_ops = { 558 + const struct inode_operations cifs_file_inode_ops = { 559 559 /* revalidate:cifs_revalidate, */ 560 560 .setattr = cifs_setattr, 561 561 .getattr = cifs_getattr, /* do we need this anymore? */ ··· 569 569 #endif 570 570 }; 571 571 572 - struct inode_operations cifs_symlink_inode_ops = { 572 + const struct inode_operations cifs_symlink_inode_ops = { 573 573 .readlink = generic_readlink, 574 574 .follow_link = cifs_follow_link, 575 575 .put_link = cifs_put_link,
+3 -3
fs/cifs/cifsfs.h
··· 42 42 /* extern void cifs_write_inode(struct inode *); *//* BB not needed yet */ 43 43 44 44 /* Functions related to inodes */ 45 - extern struct inode_operations cifs_dir_inode_ops; 45 + extern const struct inode_operations cifs_dir_inode_ops; 46 46 extern int cifs_create(struct inode *, struct dentry *, int, 47 47 struct nameidata *); 48 48 extern struct dentry * cifs_lookup(struct inode *, struct dentry *, ··· 58 58 extern int cifs_getattr(struct vfsmount *, struct dentry *, struct kstat *); 59 59 extern int cifs_setattr(struct dentry *, struct iattr *); 60 60 61 - extern struct inode_operations cifs_file_inode_ops; 62 - extern struct inode_operations cifs_symlink_inode_ops; 61 + extern const struct inode_operations cifs_file_inode_ops; 62 + extern const struct inode_operations cifs_symlink_inode_ops; 63 63 64 64 /* Functions related to files and directories */ 65 65 extern const struct file_operations cifs_file_ops;
+1 -1
fs/coda/cnode.c
··· 16 16 return memcmp(fid1, fid2, sizeof(*fid1)) == 0; 17 17 } 18 18 19 - static struct inode_operations coda_symlink_inode_operations = { 19 + static const struct inode_operations coda_symlink_inode_operations = { 20 20 .readlink = generic_readlink, 21 21 .follow_link = page_follow_link_light, 22 22 .put_link = page_put_link,
+1 -1
fs/coda/dir.c
··· 66 66 .d_delete = coda_dentry_delete, 67 67 }; 68 68 69 - struct inode_operations coda_dir_inode_operations = 69 + const struct inode_operations coda_dir_inode_operations = 70 70 { 71 71 .create = coda_create, 72 72 .lookup = coda_lookup,
+1 -1
fs/coda/inode.c
··· 271 271 return error; 272 272 } 273 273 274 - struct inode_operations coda_file_inode_operations = { 274 + const struct inode_operations coda_file_inode_operations = { 275 275 .permission = coda_permission, 276 276 .getattr = coda_getattr, 277 277 .setattr = coda_setattr,
+1 -1
fs/coda/pioctl.c
··· 30 30 unsigned int cmd, unsigned long user_data); 31 31 32 32 /* exported from this file */ 33 - struct inode_operations coda_ioctl_inode_operations = 33 + const struct inode_operations coda_ioctl_inode_operations = 34 34 { 35 35 .permission = coda_ioctl_permission, 36 36 .setattr = coda_setattr,
+2 -2
fs/configfs/configfs_internal.h
··· 75 75 extern const struct file_operations configfs_dir_operations; 76 76 extern const struct file_operations configfs_file_operations; 77 77 extern const struct file_operations bin_fops; 78 - extern struct inode_operations configfs_dir_inode_operations; 79 - extern struct inode_operations configfs_symlink_inode_operations; 78 + extern const struct inode_operations configfs_dir_inode_operations; 79 + extern const struct inode_operations configfs_symlink_inode_operations; 80 80 81 81 extern int configfs_symlink(struct inode *dir, struct dentry *dentry, 82 82 const char *symname);
+1 -1
fs/configfs/dir.c
··· 930 930 return 0; 931 931 } 932 932 933 - struct inode_operations configfs_dir_inode_operations = { 933 + const struct inode_operations configfs_dir_inode_operations = { 934 934 .mkdir = configfs_mkdir, 935 935 .rmdir = configfs_rmdir, 936 936 .symlink = configfs_symlink,
+1 -1
fs/configfs/inode.c
··· 49 49 .capabilities = BDI_CAP_NO_ACCT_DIRTY | BDI_CAP_NO_WRITEBACK, 50 50 }; 51 51 52 - static struct inode_operations configfs_inode_operations ={ 52 + static const struct inode_operations configfs_inode_operations ={ 53 53 .setattr = configfs_setattr, 54 54 }; 55 55
+1 -1
fs/configfs/symlink.c
··· 272 272 } 273 273 } 274 274 275 - struct inode_operations configfs_symlink_inode_operations = { 275 + const struct inode_operations configfs_symlink_inode_operations = { 276 276 .follow_link = configfs_follow_link, 277 277 .readlink = generic_readlink, 278 278 .put_link = configfs_put_link,
+2 -2
fs/cramfs/inode.c
··· 28 28 #include <asm/uaccess.h> 29 29 30 30 static struct super_operations cramfs_ops; 31 - static struct inode_operations cramfs_dir_inode_operations; 31 + static const struct inode_operations cramfs_dir_inode_operations; 32 32 static const struct file_operations cramfs_directory_operations; 33 33 static const struct address_space_operations cramfs_aops; 34 34 ··· 518 518 .readdir = cramfs_readdir, 519 519 }; 520 520 521 - static struct inode_operations cramfs_dir_inode_operations = { 521 + static const struct inode_operations cramfs_dir_inode_operations = { 522 522 .lookup = cramfs_lookup, 523 523 }; 524 524
+3 -3
fs/ecryptfs/ecryptfs_kernel.h
··· 446 446 447 447 extern const struct file_operations ecryptfs_main_fops; 448 448 extern const struct file_operations ecryptfs_dir_fops; 449 - extern struct inode_operations ecryptfs_main_iops; 450 - extern struct inode_operations ecryptfs_dir_iops; 451 - extern struct inode_operations ecryptfs_symlink_iops; 449 + extern const struct inode_operations ecryptfs_main_iops; 450 + extern const struct inode_operations ecryptfs_dir_iops; 451 + extern const struct inode_operations ecryptfs_symlink_iops; 452 452 extern struct super_operations ecryptfs_sops; 453 453 extern struct dentry_operations ecryptfs_dops; 454 454 extern struct address_space_operations ecryptfs_aops;
+3 -3
fs/ecryptfs/inode.c
··· 989 989 return 0; 990 990 } 991 991 992 - struct inode_operations ecryptfs_symlink_iops = { 992 + const struct inode_operations ecryptfs_symlink_iops = { 993 993 .readlink = ecryptfs_readlink, 994 994 .follow_link = ecryptfs_follow_link, 995 995 .put_link = ecryptfs_put_link, ··· 1001 1001 .removexattr = ecryptfs_removexattr 1002 1002 }; 1003 1003 1004 - struct inode_operations ecryptfs_dir_iops = { 1004 + const struct inode_operations ecryptfs_dir_iops = { 1005 1005 .create = ecryptfs_create, 1006 1006 .lookup = ecryptfs_lookup, 1007 1007 .link = ecryptfs_link, ··· 1019 1019 .removexattr = ecryptfs_removexattr 1020 1020 }; 1021 1021 1022 - struct inode_operations ecryptfs_main_iops = { 1022 + const struct inode_operations ecryptfs_main_iops = { 1023 1023 .permission = ecryptfs_permission, 1024 1024 .setattr = ecryptfs_setattr, 1025 1025 .setxattr = ecryptfs_setxattr,
+1 -1
fs/efs/dir.c
··· 15 15 .readdir = efs_readdir, 16 16 }; 17 17 18 - struct inode_operations efs_dir_inode_operations = { 18 + const struct inode_operations efs_dir_inode_operations = { 19 19 .lookup = efs_lookup, 20 20 }; 21 21
+5 -5
fs/ext2/ext2.h
··· 158 158 extern const struct file_operations ext2_dir_operations; 159 159 160 160 /* file.c */ 161 - extern struct inode_operations ext2_file_inode_operations; 161 + extern const struct inode_operations ext2_file_inode_operations; 162 162 extern const struct file_operations ext2_file_operations; 163 163 extern const struct file_operations ext2_xip_file_operations; 164 164 ··· 168 168 extern const struct address_space_operations ext2_nobh_aops; 169 169 170 170 /* namei.c */ 171 - extern struct inode_operations ext2_dir_inode_operations; 172 - extern struct inode_operations ext2_special_inode_operations; 171 + extern const struct inode_operations ext2_dir_inode_operations; 172 + extern const struct inode_operations ext2_special_inode_operations; 173 173 174 174 /* symlink.c */ 175 - extern struct inode_operations ext2_fast_symlink_inode_operations; 176 - extern struct inode_operations ext2_symlink_inode_operations; 175 + extern const struct inode_operations ext2_fast_symlink_inode_operations; 176 + extern const struct inode_operations ext2_symlink_inode_operations;
+1 -1
fs/ext2/file.c
··· 75 75 }; 76 76 #endif 77 77 78 - struct inode_operations ext2_file_inode_operations = { 78 + const struct inode_operations ext2_file_inode_operations = { 79 79 .truncate = ext2_truncate, 80 80 #ifdef CONFIG_EXT2_FS_XATTR 81 81 .setxattr = generic_setxattr,
+2 -2
fs/ext2/namei.c
··· 373 373 return err; 374 374 } 375 375 376 - struct inode_operations ext2_dir_inode_operations = { 376 + const struct inode_operations ext2_dir_inode_operations = { 377 377 .create = ext2_create, 378 378 .lookup = ext2_lookup, 379 379 .link = ext2_link, ··· 393 393 .permission = ext2_permission, 394 394 }; 395 395 396 - struct inode_operations ext2_special_inode_operations = { 396 + const struct inode_operations ext2_special_inode_operations = { 397 397 #ifdef CONFIG_EXT2_FS_XATTR 398 398 .setxattr = generic_setxattr, 399 399 .getxattr = generic_getxattr,
+2 -2
fs/ext2/symlink.c
··· 28 28 return NULL; 29 29 } 30 30 31 - struct inode_operations ext2_symlink_inode_operations = { 31 + const struct inode_operations ext2_symlink_inode_operations = { 32 32 .readlink = generic_readlink, 33 33 .follow_link = page_follow_link_light, 34 34 .put_link = page_put_link, ··· 40 40 #endif 41 41 }; 42 42 43 - struct inode_operations ext2_fast_symlink_inode_operations = { 43 + const struct inode_operations ext2_fast_symlink_inode_operations = { 44 44 .readlink = generic_readlink, 45 45 .follow_link = ext2_follow_link, 46 46 #ifdef CONFIG_EXT2_FS_XATTR
+1 -1
fs/ext3/file.c
··· 125 125 .splice_write = generic_file_splice_write, 126 126 }; 127 127 128 - struct inode_operations ext3_file_inode_operations = { 128 + const struct inode_operations ext3_file_inode_operations = { 129 129 .truncate = ext3_truncate, 130 130 .setattr = ext3_setattr, 131 131 #ifdef CONFIG_EXT3_FS_XATTR
+2 -2
fs/ext3/namei.c
··· 2365 2365 /* 2366 2366 * directories can handle most operations... 2367 2367 */ 2368 - struct inode_operations ext3_dir_inode_operations = { 2368 + const struct inode_operations ext3_dir_inode_operations = { 2369 2369 .create = ext3_create, 2370 2370 .lookup = ext3_lookup, 2371 2371 .link = ext3_link, ··· 2385 2385 .permission = ext3_permission, 2386 2386 }; 2387 2387 2388 - struct inode_operations ext3_special_inode_operations = { 2388 + const struct inode_operations ext3_special_inode_operations = { 2389 2389 .setattr = ext3_setattr, 2390 2390 #ifdef CONFIG_EXT3_FS_XATTR 2391 2391 .setxattr = generic_setxattr,
+2 -2
fs/ext3/symlink.c
··· 30 30 return NULL; 31 31 } 32 32 33 - struct inode_operations ext3_symlink_inode_operations = { 33 + const struct inode_operations ext3_symlink_inode_operations = { 34 34 .readlink = generic_readlink, 35 35 .follow_link = page_follow_link_light, 36 36 .put_link = page_put_link, ··· 42 42 #endif 43 43 }; 44 44 45 - struct inode_operations ext3_fast_symlink_inode_operations = { 45 + const struct inode_operations ext3_fast_symlink_inode_operations = { 46 46 .readlink = generic_readlink, 47 47 .follow_link = ext3_follow_link, 48 48 #ifdef CONFIG_EXT3_FS_XATTR
+1 -1
fs/ext4/file.c
··· 125 125 .splice_write = generic_file_splice_write, 126 126 }; 127 127 128 - struct inode_operations ext4_file_inode_operations = { 128 + const struct inode_operations ext4_file_inode_operations = { 129 129 .truncate = ext4_truncate, 130 130 .setattr = ext4_setattr, 131 131 #ifdef CONFIG_EXT4DEV_FS_XATTR
+2 -2
fs/ext4/namei.c
··· 2363 2363 /* 2364 2364 * directories can handle most operations... 2365 2365 */ 2366 - struct inode_operations ext4_dir_inode_operations = { 2366 + const struct inode_operations ext4_dir_inode_operations = { 2367 2367 .create = ext4_create, 2368 2368 .lookup = ext4_lookup, 2369 2369 .link = ext4_link, ··· 2383 2383 .permission = ext4_permission, 2384 2384 }; 2385 2385 2386 - struct inode_operations ext4_special_inode_operations = { 2386 + const struct inode_operations ext4_special_inode_operations = { 2387 2387 .setattr = ext4_setattr, 2388 2388 #ifdef CONFIG_EXT4DEV_FS_XATTR 2389 2389 .setxattr = generic_setxattr,
+2 -2
fs/ext4/symlink.c
··· 30 30 return NULL; 31 31 } 32 32 33 - struct inode_operations ext4_symlink_inode_operations = { 33 + const struct inode_operations ext4_symlink_inode_operations = { 34 34 .readlink = generic_readlink, 35 35 .follow_link = page_follow_link_light, 36 36 .put_link = page_put_link, ··· 42 42 #endif 43 43 }; 44 44 45 - struct inode_operations ext4_fast_symlink_inode_operations = { 45 + const struct inode_operations ext4_fast_symlink_inode_operations = { 46 46 .readlink = generic_readlink, 47 47 .follow_link = ext4_follow_link, 48 48 #ifdef CONFIG_EXT4DEV_FS_XATTR
+1 -1
fs/fat/file.c
··· 312 312 } 313 313 EXPORT_SYMBOL_GPL(fat_getattr); 314 314 315 - struct inode_operations fat_file_inode_operations = { 315 + const struct inode_operations fat_file_inode_operations = { 316 316 .truncate = fat_truncate, 317 317 .setattr = fat_notify_change, 318 318 .getattr = fat_getattr,
+1 -1
fs/fat/inode.c
··· 1151 1151 * Read the super block of an MS-DOS FS. 1152 1152 */ 1153 1153 int fat_fill_super(struct super_block *sb, void *data, int silent, 1154 - struct inode_operations *fs_dir_inode_ops, int isvfat) 1154 + const struct inode_operations *fs_dir_inode_ops, int isvfat) 1155 1155 { 1156 1156 struct inode *root_inode = NULL; 1157 1157 struct buffer_head *bh;
+1 -1
fs/freevxfs/vxfs_extern.h
··· 62 62 extern void vxfs_clear_inode(struct inode *); 63 63 64 64 /* vxfs_lookup.c */ 65 - extern struct inode_operations vxfs_dir_inode_ops; 65 + extern const struct inode_operations vxfs_dir_inode_ops; 66 66 extern const struct file_operations vxfs_dir_operations; 67 67 68 68 /* vxfs_olt.c */
+1 -1
fs/freevxfs/vxfs_immed.c
··· 48 48 * Unliked all other operations we do not go through the pagecache, 49 49 * but do all work directly on the inode. 50 50 */ 51 - struct inode_operations vxfs_immed_symlink_iops = { 51 + const struct inode_operations vxfs_immed_symlink_iops = { 52 52 .readlink = generic_readlink, 53 53 .follow_link = vxfs_immed_follow_link, 54 54 };
+1 -1
fs/freevxfs/vxfs_inode.c
··· 44 44 extern const struct address_space_operations vxfs_aops; 45 45 extern const struct address_space_operations vxfs_immed_aops; 46 46 47 - extern struct inode_operations vxfs_immed_symlink_iops; 47 + extern const struct inode_operations vxfs_immed_symlink_iops; 48 48 49 49 struct kmem_cache *vxfs_inode_cachep; 50 50
+1 -1
fs/freevxfs/vxfs_lookup.c
··· 52 52 static struct dentry * vxfs_lookup(struct inode *, struct dentry *, struct nameidata *); 53 53 static int vxfs_readdir(struct file *, void *, filldir_t); 54 54 55 - struct inode_operations vxfs_dir_inode_ops = { 55 + const struct inode_operations vxfs_dir_inode_ops = { 56 56 .lookup = vxfs_lookup, 57 57 }; 58 58
+1 -1
fs/fuse/control.c
··· 73 73 struct fuse_conn *fc, 74 74 const char *name, 75 75 int mode, int nlink, 76 - struct inode_operations *iop, 76 + const struct inode_operations *iop, 77 77 const struct file_operations *fop) 78 78 { 79 79 struct dentry *dentry;
+3 -3
fs/fuse/dir.c
··· 1242 1242 return err; 1243 1243 } 1244 1244 1245 - static struct inode_operations fuse_dir_inode_operations = { 1245 + static const struct inode_operations fuse_dir_inode_operations = { 1246 1246 .lookup = fuse_lookup, 1247 1247 .mkdir = fuse_mkdir, 1248 1248 .symlink = fuse_symlink, ··· 1270 1270 .fsync = fuse_dir_fsync, 1271 1271 }; 1272 1272 1273 - static struct inode_operations fuse_common_inode_operations = { 1273 + static const struct inode_operations fuse_common_inode_operations = { 1274 1274 .setattr = fuse_setattr, 1275 1275 .permission = fuse_permission, 1276 1276 .getattr = fuse_getattr, ··· 1280 1280 .removexattr = fuse_removexattr, 1281 1281 }; 1282 1282 1283 - static struct inode_operations fuse_symlink_inode_operations = { 1283 + static const struct inode_operations fuse_symlink_inode_operations = { 1284 1284 .setattr = fuse_setattr, 1285 1285 .follow_link = fuse_follow_link, 1286 1286 .put_link = fuse_put_link,