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

const: mark remaining inode_operations as const

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alexey Dobriyan and committed by
Linus Torvalds
6e1d5dcc 7f09410b

+30 -30
+1 -1
arch/powerpc/platforms/cell/spufs/inode.c
··· 119 119 const struct file_operations *fops, int mode, 120 120 size_t size, struct spu_context *ctx) 121 121 { 122 - static struct inode_operations spufs_file_iops = { 122 + static const struct inode_operations spufs_file_iops = { 123 123 .setattr = spufs_setattr, 124 124 }; 125 125 struct inode *inode;
+10 -10
fs/btrfs/inode.c
··· 55 55 struct btrfs_root *root; 56 56 }; 57 57 58 - static struct inode_operations btrfs_dir_inode_operations; 59 - static struct inode_operations btrfs_symlink_inode_operations; 60 - static struct inode_operations btrfs_dir_ro_inode_operations; 61 - static struct inode_operations btrfs_special_inode_operations; 62 - static struct inode_operations btrfs_file_inode_operations; 58 + static const struct inode_operations btrfs_dir_inode_operations; 59 + static const struct inode_operations btrfs_symlink_inode_operations; 60 + static const struct inode_operations btrfs_dir_ro_inode_operations; 61 + static const struct inode_operations btrfs_special_inode_operations; 62 + static const struct inode_operations btrfs_file_inode_operations; 63 63 static const struct address_space_operations btrfs_aops; 64 64 static const struct address_space_operations btrfs_symlink_aops; 65 65 static struct file_operations btrfs_dir_file_operations; ··· 5201 5201 return generic_permission(inode, mask, btrfs_check_acl); 5202 5202 } 5203 5203 5204 - static struct inode_operations btrfs_dir_inode_operations = { 5204 + static const struct inode_operations btrfs_dir_inode_operations = { 5205 5205 .getattr = btrfs_getattr, 5206 5206 .lookup = btrfs_lookup, 5207 5207 .create = btrfs_create, ··· 5219 5219 .removexattr = btrfs_removexattr, 5220 5220 .permission = btrfs_permission, 5221 5221 }; 5222 - static struct inode_operations btrfs_dir_ro_inode_operations = { 5222 + static const struct inode_operations btrfs_dir_ro_inode_operations = { 5223 5223 .lookup = btrfs_lookup, 5224 5224 .permission = btrfs_permission, 5225 5225 }; ··· 5278 5278 .releasepage = btrfs_releasepage, 5279 5279 }; 5280 5280 5281 - static struct inode_operations btrfs_file_inode_operations = { 5281 + static const struct inode_operations btrfs_file_inode_operations = { 5282 5282 .truncate = btrfs_truncate, 5283 5283 .getattr = btrfs_getattr, 5284 5284 .setattr = btrfs_setattr, ··· 5290 5290 .fallocate = btrfs_fallocate, 5291 5291 .fiemap = btrfs_fiemap, 5292 5292 }; 5293 - static struct inode_operations btrfs_special_inode_operations = { 5293 + static const struct inode_operations btrfs_special_inode_operations = { 5294 5294 .getattr = btrfs_getattr, 5295 5295 .setattr = btrfs_setattr, 5296 5296 .permission = btrfs_permission, ··· 5299 5299 .listxattr = btrfs_listxattr, 5300 5300 .removexattr = btrfs_removexattr, 5301 5301 }; 5302 - static struct inode_operations btrfs_symlink_inode_operations = { 5302 + static const struct inode_operations btrfs_symlink_inode_operations = { 5303 5303 .readlink = generic_readlink, 5304 5304 .follow_link = page_follow_link_light, 5305 5305 .put_link = page_put_link,
+1 -1
fs/cifs/cifs_dfs_ref.c
··· 385 385 goto out; 386 386 } 387 387 388 - struct inode_operations cifs_dfs_referral_inode_operations = { 388 + const struct inode_operations cifs_dfs_referral_inode_operations = { 389 389 .follow_link = cifs_dfs_follow_mountpoint, 390 390 }; 391 391
+1 -1
fs/cifs/cifsfs.h
··· 67 67 68 68 extern const struct inode_operations cifs_file_inode_ops; 69 69 extern const struct inode_operations cifs_symlink_inode_ops; 70 - extern struct inode_operations cifs_dfs_referral_inode_operations; 70 + extern const struct inode_operations cifs_dfs_referral_inode_operations; 71 71 72 72 73 73 /* Functions related to files and directories */
+1 -1
fs/inode.c
··· 123 123 int inode_init_always(struct super_block *sb, struct inode *inode) 124 124 { 125 125 static const struct address_space_operations empty_aops; 126 - static struct inode_operations empty_iops; 126 + static const struct inode_operations empty_iops; 127 127 static const struct file_operations empty_fops; 128 128 struct address_space *const mapping = &inode->i_data; 129 129
+1 -1
fs/nilfs2/file.c
··· 151 151 .splice_read = generic_file_splice_read, 152 152 }; 153 153 154 - struct inode_operations nilfs_file_inode_operations = { 154 + const struct inode_operations nilfs_file_inode_operations = { 155 155 .truncate = nilfs_truncate, 156 156 .setattr = nilfs_setattr, 157 157 .permission = nilfs_permission,
+1 -1
fs/nilfs2/mdt.c
··· 432 432 .sync_page = block_sync_page, 433 433 }; 434 434 435 - static struct inode_operations def_mdt_iops; 435 + static const struct inode_operations def_mdt_iops; 436 436 static struct file_operations def_mdt_fops; 437 437 438 438 /*
+3 -3
fs/nilfs2/namei.c
··· 448 448 return err; 449 449 } 450 450 451 - struct inode_operations nilfs_dir_inode_operations = { 451 + const struct inode_operations nilfs_dir_inode_operations = { 452 452 .create = nilfs_create, 453 453 .lookup = nilfs_lookup, 454 454 .link = nilfs_link, ··· 462 462 .permission = nilfs_permission, 463 463 }; 464 464 465 - struct inode_operations nilfs_special_inode_operations = { 465 + const struct inode_operations nilfs_special_inode_operations = { 466 466 .setattr = nilfs_setattr, 467 467 .permission = nilfs_permission, 468 468 }; 469 469 470 - struct inode_operations nilfs_symlink_inode_operations = { 470 + const struct inode_operations nilfs_symlink_inode_operations = { 471 471 .readlink = generic_readlink, 472 472 .follow_link = page_follow_link_light, 473 473 .put_link = page_put_link,
+4 -4
fs/nilfs2/nilfs.h
··· 295 295 * Inodes and files operations 296 296 */ 297 297 extern struct file_operations nilfs_dir_operations; 298 - extern struct inode_operations nilfs_file_inode_operations; 298 + extern const struct inode_operations nilfs_file_inode_operations; 299 299 extern struct file_operations nilfs_file_operations; 300 300 extern const struct address_space_operations nilfs_aops; 301 - extern struct inode_operations nilfs_dir_inode_operations; 302 - extern struct inode_operations nilfs_special_inode_operations; 303 - extern struct inode_operations nilfs_symlink_inode_operations; 301 + extern const struct inode_operations nilfs_dir_inode_operations; 302 + extern const struct inode_operations nilfs_special_inode_operations; 303 + extern const struct inode_operations nilfs_symlink_inode_operations; 304 304 305 305 /* 306 306 * filesystem type
+1 -1
fs/omfs/dir.c
··· 489 489 return ret; 490 490 } 491 491 492 - struct inode_operations omfs_dir_inops = { 492 + const struct inode_operations omfs_dir_inops = { 493 493 .lookup = omfs_lookup, 494 494 .mkdir = omfs_mkdir, 495 495 .rename = omfs_rename,
+1 -1
fs/omfs/file.c
··· 333 333 .splice_read = generic_file_splice_read, 334 334 }; 335 335 336 - struct inode_operations omfs_file_inops = { 336 + const struct inode_operations omfs_file_inops = { 337 337 .truncate = omfs_truncate 338 338 }; 339 339
+2 -2
fs/omfs/omfs.h
··· 45 45 46 46 /* dir.c */ 47 47 extern struct file_operations omfs_dir_operations; 48 - extern struct inode_operations omfs_dir_inops; 48 + extern const struct inode_operations omfs_dir_inops; 49 49 extern int omfs_make_empty(struct inode *inode, struct super_block *sb); 50 50 extern int omfs_is_bad(struct omfs_sb_info *sbi, struct omfs_header *header, 51 51 u64 fsblock); 52 52 53 53 /* file.c */ 54 54 extern struct file_operations omfs_file_operations; 55 - extern struct inode_operations omfs_file_inops; 55 + extern const struct inode_operations omfs_file_inops; 56 56 extern const struct address_space_operations omfs_aops; 57 57 extern void omfs_make_empty_table(struct buffer_head *bh, int offset); 58 58 extern int omfs_shrink_inode(struct inode *inode);
+1 -1
fs/romfs/super.c
··· 284 284 .readdir = romfs_readdir, 285 285 }; 286 286 287 - static struct inode_operations romfs_dir_inode_operations = { 287 + static const struct inode_operations romfs_dir_inode_operations = { 288 288 .lookup = romfs_lookup, 289 289 }; 290 290
+2 -2
kernel/cgroup.c
··· 596 596 static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, int mode); 597 597 static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry); 598 598 static int cgroup_populate_dir(struct cgroup *cgrp); 599 - static struct inode_operations cgroup_dir_inode_operations; 599 + static const struct inode_operations cgroup_dir_inode_operations; 600 600 static struct file_operations proc_cgroupstats_operations; 601 601 602 602 static struct backing_dev_info cgroup_backing_dev_info = { ··· 1711 1711 .release = cgroup_file_release, 1712 1712 }; 1713 1713 1714 - static struct inode_operations cgroup_dir_inode_operations = { 1714 + static const struct inode_operations cgroup_dir_inode_operations = { 1715 1715 .lookup = simple_lookup, 1716 1716 .mkdir = cgroup_mkdir, 1717 1717 .rmdir = cgroup_rmdir,