[PATCH] mark struct inode_operations const 1
authorArjan van de Ven <arjan@linux.intel.com>
Mon, 12 Feb 2007 08:55:38 +0000 (00:55 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 12 Feb 2007 17:48:46 +0000 (09:48 -0800)
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>
57 files changed:
arch/powerpc/platforms/cell/spufs/inode.c
fs/9p/vfs_inode.c
fs/adfs/adfs.h
fs/adfs/dir.c
fs/adfs/file.c
fs/affs/affs.h
fs/affs/dir.c
fs/affs/file.c
fs/affs/inode.c
fs/affs/symlink.c
fs/afs/dir.c
fs/afs/file.c
fs/afs/internal.h
fs/afs/mntpt.c
fs/autofs/autofs_i.h
fs/autofs/root.c
fs/autofs/symlink.c
fs/autofs4/autofs_i.h
fs/autofs4/root.c
fs/autofs4/symlink.c
fs/bad_inode.c
fs/befs/linuxvfs.c
fs/bfs/bfs.h
fs/bfs/dir.c
fs/bfs/file.c
fs/cifs/cifsfs.c
fs/cifs/cifsfs.h
fs/coda/cnode.c
fs/coda/dir.c
fs/coda/inode.c
fs/coda/pioctl.c
fs/configfs/configfs_internal.h
fs/configfs/dir.c
fs/configfs/inode.c
fs/configfs/symlink.c
fs/cramfs/inode.c
fs/ecryptfs/ecryptfs_kernel.h
fs/ecryptfs/inode.c
fs/efs/dir.c
fs/ext2/ext2.h
fs/ext2/file.c
fs/ext2/namei.c
fs/ext2/symlink.c
fs/ext3/file.c
fs/ext3/namei.c
fs/ext3/symlink.c
fs/ext4/file.c
fs/ext4/namei.c
fs/ext4/symlink.c
fs/fat/file.c
fs/fat/inode.c
fs/freevxfs/vxfs_extern.h
fs/freevxfs/vxfs_immed.c
fs/freevxfs/vxfs_inode.c
fs/freevxfs/vxfs_lookup.c
fs/fuse/control.c
fs/fuse/dir.c

index bffc934ceadb265d7ca128fa311a8dc48a4f7f6f..8079983ef94fa5486c264cdf85123acbbbcbb161 100644 (file)
@@ -220,7 +220,7 @@ static int spufs_dir_close(struct inode *inode, struct file *file)
        return dcache_dir_close(inode, file);
 }
 
-struct inode_operations spufs_dir_inode_operations = {
+const struct inode_operations spufs_dir_inode_operations = {
        .lookup = simple_lookup,
 };
 
index 378767c07bf11f746d1387e11dcebc087912adbd..5cf22134826bded20a24b57be206f2ff3624f3b4 100644 (file)
 #include "v9fs_vfs.h"
 #include "fid.h"
 
-static struct inode_operations v9fs_dir_inode_operations;
-static struct inode_operations v9fs_dir_inode_operations_ext;
-static struct inode_operations v9fs_file_inode_operations;
-static struct inode_operations v9fs_symlink_inode_operations;
+static const struct inode_operations v9fs_dir_inode_operations;
+static const struct inode_operations v9fs_dir_inode_operations_ext;
+static const struct inode_operations v9fs_file_inode_operations;
+static const struct inode_operations v9fs_symlink_inode_operations;
 
 /**
  * unixmode2p9mode - convert unix mode bits to plan 9
@@ -1303,7 +1303,7 @@ v9fs_vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev)
        return retval;
 }
 
-static struct inode_operations v9fs_dir_inode_operations_ext = {
+static const struct inode_operations v9fs_dir_inode_operations_ext = {
        .create = v9fs_vfs_create,
        .lookup = v9fs_vfs_lookup,
        .symlink = v9fs_vfs_symlink,
@@ -1318,7 +1318,7 @@ static struct inode_operations v9fs_dir_inode_operations_ext = {
        .setattr = v9fs_vfs_setattr,
 };
 
-static struct inode_operations v9fs_dir_inode_operations = {
+static const struct inode_operations v9fs_dir_inode_operations = {
        .create = v9fs_vfs_create,
        .lookup = v9fs_vfs_lookup,
        .unlink = v9fs_vfs_unlink,
@@ -1330,12 +1330,12 @@ static struct inode_operations v9fs_dir_inode_operations = {
        .setattr = v9fs_vfs_setattr,
 };
 
-static struct inode_operations v9fs_file_inode_operations = {
+static const struct inode_operations v9fs_file_inode_operations = {
        .getattr = v9fs_vfs_getattr,
        .setattr = v9fs_vfs_setattr,
 };
 
-static struct inode_operations v9fs_symlink_inode_operations = {
+static const struct inode_operations v9fs_symlink_inode_operations = {
        .readlink = v9fs_vfs_readlink,
        .follow_link = v9fs_vfs_follow_link,
        .put_link = v9fs_vfs_put_link,
index 29217ff36d446a673dbabde26823b948aa6ce89b..936f2af39c433e12dfb8966b8716c3a90d7f1d2c 100644 (file)
@@ -84,7 +84,7 @@ void __adfs_error(struct super_block *sb, const char *function,
  */
 
 /* dir_*.c */
-extern struct inode_operations adfs_dir_inode_operations;
+extern const struct inode_operations adfs_dir_inode_operations;
 extern const struct file_operations adfs_dir_operations;
 extern struct dentry_operations adfs_dentry_operations;
 extern struct adfs_dir_ops adfs_f_dir_ops;
@@ -93,7 +93,7 @@ extern struct adfs_dir_ops adfs_fplus_dir_ops;
 extern int adfs_dir_update(struct super_block *sb, struct object_info *obj);
 
 /* file.c */
-extern struct inode_operations adfs_file_inode_operations;
+extern const struct inode_operations adfs_file_inode_operations;
 extern const struct file_operations adfs_file_operations;
 
 static inline __u32 signed_asl(__u32 val, signed int shift)
index 2b8903893d3f76be76ec4aa564b506b79c00d503..fc1a8dc64d78a8c8fcd03533739fe83f4b10b25d 100644 (file)
@@ -295,7 +295,7 @@ adfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
 /*
  * directories can handle most operations...
  */
-struct inode_operations adfs_dir_inode_operations = {
+const struct inode_operations adfs_dir_inode_operations = {
        .lookup         = adfs_lookup,
        .setattr        = adfs_notify_change,
 };
index 6101ea679cb1bf7772ba5da5342d7fb6def023ee..f544a285592343d4ac4cb9d1455a2c4e602cc2b9 100644 (file)
@@ -36,6 +36,6 @@ const struct file_operations adfs_file_operations = {
        .sendfile       = generic_file_sendfile,
 };
 
-struct inode_operations adfs_file_inode_operations = {
+const struct inode_operations adfs_file_inode_operations = {
        .setattr        = adfs_notify_change,
 };
index 1dc8438ef389591a4dc79ce9545e444189f19e79..7db2d287e9f39576c1d18d595988ddc87eb51843 100644 (file)
@@ -188,9 +188,9 @@ extern void   affs_dir_truncate(struct inode *);
 
 /* jump tables */
 
-extern struct inode_operations  affs_file_inode_operations;
-extern struct inode_operations  affs_dir_inode_operations;
-extern struct inode_operations   affs_symlink_inode_operations;
+extern const struct inode_operations    affs_file_inode_operations;
+extern const struct inode_operations    affs_dir_inode_operations;
+extern const struct inode_operations   affs_symlink_inode_operations;
 extern const struct file_operations     affs_file_operations;
 extern const struct file_operations     affs_file_operations_ofs;
 extern const struct file_operations     affs_dir_operations;
index cad3ee340063238177b3f9c0976b20994c9b0820..6e3f282424b035a59b5add052ce5df098b90eb5f 100644 (file)
@@ -26,7 +26,7 @@ const struct file_operations affs_dir_operations = {
 /*
  * directories can handle most operations...
  */
-struct inode_operations affs_dir_inode_operations = {
+const struct inode_operations affs_dir_inode_operations = {
        .create         = affs_create,
        .lookup         = affs_lookup,
        .link           = affs_link,
index 05b5e22de759e10513301ac7b441bc4127c3b492..4aa8079e71be8c7c9ffb7f92d88cd1ce852a38af 100644 (file)
@@ -38,7 +38,7 @@ const struct file_operations affs_file_operations = {
        .sendfile       = generic_file_sendfile,
 };
 
-struct inode_operations affs_file_inode_operations = {
+const struct inode_operations affs_file_inode_operations = {
        .truncate       = affs_truncate,
        .setattr        = affs_notify_change,
 };
index 44d439cb69f491a2dc7b5012c014ae429de4c0fb..fce6848a4641a91a4d5341e69f0106ec99d02e36 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "affs.h"
 
-extern struct inode_operations affs_symlink_inode_operations;
+extern const struct inode_operations affs_symlink_inode_operations;
 extern struct timezone sys_tz;
 
 void
index f802256a59330d96d537ac513f636b01a81eb79c..41782539c907b0cd1697ac161e20cfec22a76202 100644 (file)
@@ -70,7 +70,7 @@ const struct address_space_operations affs_symlink_aops = {
        .readpage       = affs_symlink_readpage,
 };
 
-struct inode_operations affs_symlink_inode_operations = {
+const struct inode_operations affs_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = page_follow_link_light,
        .put_link       = page_put_link,
index 4acd0413405568c6d6f9623bbdfd755637574b14..9908462bcadc2fcd6ccc113aafc9dbf2d0569f13 100644 (file)
@@ -37,7 +37,7 @@ const struct file_operations afs_dir_file_operations = {
        .readdir        = afs_dir_readdir,
 };
 
-struct inode_operations afs_dir_inode_operations = {
+const struct inode_operations afs_dir_inode_operations = {
        .lookup         = afs_dir_lookup,
        .getattr        = afs_inode_getattr,
 #if 0 /* TODO */
index 2e8c42639eaa54803887b441758d6e176b4cb58b..eeff14c3f748e2df1486450dc6b92e7509f31273 100644 (file)
@@ -30,7 +30,7 @@ static int afs_file_readpage(struct file *file, struct page *page);
 static void afs_file_invalidatepage(struct page *page, unsigned long offset);
 static int afs_file_releasepage(struct page *page, gfp_t gfp_flags);
 
-struct inode_operations afs_file_inode_operations = {
+const struct inode_operations afs_file_inode_operations = {
        .getattr        = afs_inode_getattr,
 };
 
index e88b3b65ae494a2861c8447b0592e9a7abcc353c..5151d5da2c2fb58ecbf493699c2da019ba6cb3d6 100644 (file)
@@ -63,14 +63,14 @@ extern struct cachefs_index_def afs_cache_cell_index_def;
 /*
  * dir.c
  */
-extern struct inode_operations afs_dir_inode_operations;
+extern const struct inode_operations afs_dir_inode_operations;
 extern const struct file_operations afs_dir_file_operations;
 
 /*
  * file.c
  */
 extern const struct address_space_operations afs_fs_aops;
-extern struct inode_operations afs_file_inode_operations;
+extern const struct inode_operations afs_file_inode_operations;
 
 #ifdef AFS_CACHING_SUPPORT
 extern int afs_cache_get_page_cookie(struct page *page,
@@ -104,7 +104,7 @@ extern struct cachefs_netfs afs_cache_netfs;
 /*
  * mntpt.c
  */
-extern struct inode_operations afs_mntpt_inode_operations;
+extern const struct inode_operations afs_mntpt_inode_operations;
 extern const struct file_operations afs_mntpt_file_operations;
 extern struct afs_timer afs_mntpt_expiry_timer;
 extern struct afs_timer_ops afs_mntpt_expiry_timer_ops;
index 8f74e845082659fd1efc291f7f37f6f1026ef274..fdf23b2a21120493a9a6ab6a37155149a853b055 100644 (file)
@@ -36,7 +36,7 @@ const struct file_operations afs_mntpt_file_operations = {
        .open           = afs_mntpt_open,
 };
 
-struct inode_operations afs_mntpt_inode_operations = {
+const struct inode_operations afs_mntpt_inode_operations = {
        .lookup         = afs_mntpt_lookup,
        .follow_link    = afs_mntpt_follow_link,
        .readlink       = page_readlink,
index 906ba5ce22617b12d7d3000eaab056f495b4159d..4ef544434b515d85511bf86c95a6322f520921a0 100644 (file)
@@ -142,8 +142,8 @@ struct autofs_dir_ent *autofs_expire(struct super_block *,struct autofs_sb_info
 
 /* Operations structures */
 
-extern struct inode_operations autofs_root_inode_operations;
-extern struct inode_operations autofs_symlink_inode_operations;
+extern const struct inode_operations autofs_root_inode_operations;
+extern const struct inode_operations autofs_symlink_inode_operations;
 extern const struct file_operations autofs_root_operations;
 
 /* Initializing function */
index e698c51d2b02f167b151dfb04e515870b8dd2c31..f2597205939d5efc6b56031a7569687c4f7063f1 100644 (file)
@@ -32,7 +32,7 @@ const struct file_operations autofs_root_operations = {
        .ioctl          = autofs_root_ioctl,
 };
 
-struct inode_operations autofs_root_inode_operations = {
+const struct inode_operations autofs_root_inode_operations = {
         .lookup                = autofs_root_lookup,
         .unlink                = autofs_root_unlink,
         .symlink       = autofs_root_symlink,
index c74f2eb6577521ffec6f01bb1a7f0d21f66af5c1..7ce9cb2c9ce21f74db531eef41d5df420feca5af 100644 (file)
@@ -20,7 +20,7 @@ static void *autofs_follow_link(struct dentry *dentry, struct nameidata *nd)
        return NULL;
 }
 
-struct inode_operations autofs_symlink_inode_operations = {
+const struct inode_operations autofs_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = autofs_follow_link
 };
index 216b1a364ccb76dc782573d87c85eaa72b89588c..6b4cec3f272ff091a893e85e0ee927459422ef22 100644 (file)
@@ -168,11 +168,11 @@ int autofs4_expire_multi(struct super_block *, struct vfsmount *,
 
 /* Operations structures */
 
-extern struct inode_operations autofs4_symlink_inode_operations;
-extern struct inode_operations autofs4_dir_inode_operations;
-extern struct inode_operations autofs4_root_inode_operations;
-extern struct inode_operations autofs4_indirect_root_inode_operations;
-extern struct inode_operations autofs4_direct_root_inode_operations;
+extern const struct inode_operations autofs4_symlink_inode_operations;
+extern const struct inode_operations autofs4_dir_inode_operations;
+extern const struct inode_operations autofs4_root_inode_operations;
+extern const struct inode_operations autofs4_indirect_root_inode_operations;
+extern const struct inode_operations autofs4_direct_root_inode_operations;
 extern const struct file_operations autofs4_dir_operations;
 extern const struct file_operations autofs4_root_operations;
 
index 8d05b9f7578dc8dcaf65dcaa4bbb71a0d69e3191..47fee96c21828de22ad5b5c78acfd8bf0e16c611 100644 (file)
@@ -47,7 +47,7 @@ const struct file_operations autofs4_dir_operations = {
        .readdir        = autofs4_dir_readdir,
 };
 
-struct inode_operations autofs4_indirect_root_inode_operations = {
+const struct inode_operations autofs4_indirect_root_inode_operations = {
        .lookup         = autofs4_lookup,
        .unlink         = autofs4_dir_unlink,
        .symlink        = autofs4_dir_symlink,
@@ -55,7 +55,7 @@ struct inode_operations autofs4_indirect_root_inode_operations = {
        .rmdir          = autofs4_dir_rmdir,
 };
 
-struct inode_operations autofs4_direct_root_inode_operations = {
+const struct inode_operations autofs4_direct_root_inode_operations = {
        .lookup         = autofs4_lookup,
        .unlink         = autofs4_dir_unlink,
        .mkdir          = autofs4_dir_mkdir,
@@ -63,7 +63,7 @@ struct inode_operations autofs4_direct_root_inode_operations = {
        .follow_link    = autofs4_follow_link,
 };
 
-struct inode_operations autofs4_dir_inode_operations = {
+const struct inode_operations autofs4_dir_inode_operations = {
        .lookup         = autofs4_lookup,
        .unlink         = autofs4_dir_unlink,
        .symlink        = autofs4_dir_symlink,
index 2ea2c98fd84bdc6ee03e3fda05a1d66425204caf..b4ea82934d2e3a7a8f2707cbac630b5627faca84 100644 (file)
@@ -19,7 +19,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
        return NULL;
 }
 
-struct inode_operations autofs4_symlink_inode_operations = {
+const struct inode_operations autofs4_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = autofs4_follow_link
 };
index 869f5193ecc248321d1c2468d7de6090cb70954b..efeab2fab40b743e55718de1c365ec278804664c 100644 (file)
@@ -291,7 +291,7 @@ static int bad_inode_removexattr(struct dentry *dentry, const char *name)
        return -EIO;
 }
 
-static struct inode_operations bad_inode_ops =
+static const struct inode_operations bad_inode_ops =
 {
        .create         = bad_inode_create,
        .lookup         = bad_inode_lookup,
index 481e59b9d91cda482d5e89a4a7990c5b1c8b51b2..cc6cc8ed2e3963ca813ae31ba7b9169ff399038f 100644 (file)
@@ -68,7 +68,7 @@ static const struct file_operations befs_dir_operations = {
        .readdir        = befs_readdir,
 };
 
-static struct inode_operations befs_dir_inode_operations = {
+static const struct inode_operations befs_dir_inode_operations = {
        .lookup         = befs_lookup,
 };
 
@@ -78,7 +78,7 @@ static const struct address_space_operations befs_aops = {
        .bmap           = befs_bmap,
 };
 
-static struct inode_operations befs_symlink_inode_operations = {
+static const struct inode_operations befs_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = befs_follow_link,
        .put_link       = befs_put_link,
index 31973bbbf0574d285c71e309cbdbc36de83d0784..130f6c66c5ba09dab89de3b7865ac09a6c96ae25 100644 (file)
@@ -48,12 +48,12 @@ static inline struct bfs_inode_info *BFS_I(struct inode *inode)
 
 
 /* file.c */
-extern struct inode_operations bfs_file_inops;
+extern const struct inode_operations bfs_file_inops;
 extern const struct file_operations bfs_file_operations;
 extern const struct address_space_operations bfs_aops;
 
 /* dir.c */
-extern struct inode_operations bfs_dir_inops;
+extern const struct inode_operations bfs_dir_inops;
 extern const struct file_operations bfs_dir_operations;
 
 #endif /* _FS_BFS_BFS_H */
index 2a746e688df556519b8d597c999ab2205562ab9f..097f1497f743a2063e66c9511d947e6917251996 100644 (file)
@@ -260,7 +260,7 @@ end_rename:
        return error;
 }
 
-struct inode_operations bfs_dir_inops = {
+const struct inode_operations bfs_dir_inops = {
        .create                 = bfs_create,
        .lookup                 = bfs_lookup,
        .link                   = bfs_link,
index a9164a87f8deebfee1ceefd1f722bb0baac75491..ef4d1fa04e654f3f792840cff4db34ab82b9a1f0 100644 (file)
@@ -164,4 +164,4 @@ const struct address_space_operations bfs_aops = {
        .bmap           = bfs_bmap,
 };
 
-struct inode_operations bfs_file_inops;
+const struct inode_operations bfs_file_inops;
index 93ef09971d2fafb9f92ecd0eed6034c9661f1192..481e84f5f361d5474900545183a30421b0794ae4 100644 (file)
@@ -533,7 +533,7 @@ static struct file_system_type cifs_fs_type = {
        .kill_sb = kill_anon_super,
        /*  .fs_flags */
 };
-struct inode_operations cifs_dir_inode_ops = {
+const struct inode_operations cifs_dir_inode_ops = {
        .create = cifs_create,
        .lookup = cifs_lookup,
        .getattr = cifs_getattr,
@@ -555,7 +555,7 @@ struct inode_operations cifs_dir_inode_ops = {
 #endif
 };
 
-struct inode_operations cifs_file_inode_ops = {
+const struct inode_operations cifs_file_inode_ops = {
 /*     revalidate:cifs_revalidate, */
        .setattr = cifs_setattr,
        .getattr = cifs_getattr, /* do we need this anymore? */
@@ -569,7 +569,7 @@ struct inode_operations cifs_file_inode_ops = {
 #endif 
 };
 
-struct inode_operations cifs_symlink_inode_ops = {
+const struct inode_operations cifs_symlink_inode_ops = {
        .readlink = generic_readlink, 
        .follow_link = cifs_follow_link,
        .put_link = cifs_put_link,
index 8aa66dcf13bd2f342dd19d72e148bc91725151cc..ab9e20a863f35e9af59a910064d8374cfa36ac5b 100644 (file)
@@ -42,7 +42,7 @@ extern void cifs_delete_inode(struct inode *);
 /* extern void cifs_write_inode(struct inode *); *//* BB not needed yet */
 
 /* Functions related to inodes */
-extern struct inode_operations cifs_dir_inode_ops;
+extern const struct inode_operations cifs_dir_inode_ops;
 extern int cifs_create(struct inode *, struct dentry *, int, 
                       struct nameidata *);
 extern struct dentry * cifs_lookup(struct inode *, struct dentry *,
@@ -58,8 +58,8 @@ extern int cifs_revalidate(struct dentry *);
 extern int cifs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
 extern int cifs_setattr(struct dentry *, struct iattr *);
 
-extern struct inode_operations cifs_file_inode_ops;
-extern struct inode_operations cifs_symlink_inode_ops;
+extern const struct inode_operations cifs_file_inode_ops;
+extern const struct inode_operations cifs_symlink_inode_ops;
 
 /* Functions related to files and directories */
 extern const struct file_operations cifs_file_ops;
index 4c9fecbfa91f1a82f09e531de40eb00612017bb0..28c872747f8170f45aa490987cfae07a80f7eee5 100644 (file)
@@ -16,7 +16,7 @@ static inline int coda_fideq(struct CodaFid *fid1, struct CodaFid *fid2)
        return memcmp(fid1, fid2, sizeof(*fid1)) == 0;
 }
 
-static struct inode_operations coda_symlink_inode_operations = {
+static const struct inode_operations coda_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = page_follow_link_light,
        .put_link       = page_put_link,
index 0c6f7f3b3dd7c36d9ba646b08cac3dc02cbae81f..9ddf5ed62162fdf767fbf30ff3d2f0cff82ad8e7 100644 (file)
@@ -66,7 +66,7 @@ static struct dentry_operations coda_dentry_operations =
        .d_delete       = coda_dentry_delete,
 };
 
-struct inode_operations coda_dir_inode_operations =
+const struct inode_operations coda_dir_inode_operations =
 {
        .create         = coda_create,
        .lookup         = coda_lookup,
index 01395defed85becda2176a54dfc089721f80a266..1562515efdb52792791ab3b0026a15d9f76e3169 100644 (file)
@@ -271,7 +271,7 @@ int coda_setattr(struct dentry *de, struct iattr *iattr)
        return error;
 }
 
-struct inode_operations coda_file_inode_operations = {
+const struct inode_operations coda_file_inode_operations = {
        .permission     = coda_permission,
        .getattr        = coda_getattr,
        .setattr        = coda_setattr,
index 214822be87bdd424c07a9cc116d74a4ca6e5eada..2bf3026adc803065c02e1a80912cc0b2ffe7e266 100644 (file)
@@ -30,7 +30,7 @@ static int coda_pioctl(struct inode * inode, struct file * filp,
                        unsigned int cmd, unsigned long user_data);
 
 /* exported from this file */
-struct inode_operations coda_ioctl_inode_operations =
+const struct inode_operations coda_ioctl_inode_operations =
 {
        .permission     = coda_ioctl_permission,
        .setattr        = coda_setattr,
index f92cd303d2c9599a2837ee012814aabc15153891..7b48c034b312128cbf64fe2094aa7155b5323fdb 100644 (file)
@@ -75,8 +75,8 @@ extern struct super_block * configfs_sb;
 extern const struct file_operations configfs_dir_operations;
 extern const struct file_operations configfs_file_operations;
 extern const struct file_operations bin_fops;
-extern struct inode_operations configfs_dir_inode_operations;
-extern struct inode_operations configfs_symlink_inode_operations;
+extern const struct inode_operations configfs_dir_inode_operations;
+extern const struct inode_operations configfs_symlink_inode_operations;
 
 extern int configfs_symlink(struct inode *dir, struct dentry *dentry,
                            const char *symname);
index 9371ee20995405ca32a9c36cf6b418412b64f0ce..34750d5e4ff2c4b0b6b3bc841fdcb016db5f5d62 100644 (file)
@@ -930,7 +930,7 @@ static int configfs_rmdir(struct inode *dir, struct dentry *dentry)
        return 0;
 }
 
-struct inode_operations configfs_dir_inode_operations = {
+const struct inode_operations configfs_dir_inode_operations = {
        .mkdir          = configfs_mkdir,
        .rmdir          = configfs_rmdir,
        .symlink        = configfs_symlink,
index fb18917954a91f95643b38352adab17a42e98600..2ec9beac17cffd55a83a41dad48a586f5cc44df4 100644 (file)
@@ -49,7 +49,7 @@ static struct backing_dev_info configfs_backing_dev_info = {
        .capabilities   = BDI_CAP_NO_ACCT_DIRTY | BDI_CAP_NO_WRITEBACK,
 };
 
-static struct inode_operations configfs_inode_operations ={
+static const struct inode_operations configfs_inode_operations ={
        .setattr        = configfs_setattr,
 };
 
index fb65e0800a86b66fa6afe2bad9a99c624daddebf..22700d2857daa36b62173fdedc5960d317ade1e9 100644 (file)
@@ -272,7 +272,7 @@ static void configfs_put_link(struct dentry *dentry, struct nameidata *nd,
        }
 }
 
-struct inode_operations configfs_symlink_inode_operations = {
+const struct inode_operations configfs_symlink_inode_operations = {
        .follow_link = configfs_follow_link,
        .readlink = generic_readlink,
        .put_link = configfs_put_link,
index 6db03fb089dcaa3fdd2dc43d1784e158e3ec4ea7..0367d200a2debe8fdaaf6f83f559391d6107d13d 100644 (file)
@@ -28,7 +28,7 @@
 #include <asm/uaccess.h>
 
 static struct super_operations cramfs_ops;
-static struct inode_operations cramfs_dir_inode_operations;
+static const struct inode_operations cramfs_dir_inode_operations;
 static const struct file_operations cramfs_directory_operations;
 static const struct address_space_operations cramfs_aops;
 
@@ -518,7 +518,7 @@ static const struct file_operations cramfs_directory_operations = {
        .readdir        = cramfs_readdir,
 };
 
-static struct inode_operations cramfs_dir_inode_operations = {
+static const struct inode_operations cramfs_dir_inode_operations = {
        .lookup         = cramfs_lookup,
 };
 
index 839a34fa6fab1172e9b9750981a7572c5d71ddd9..275445d17162e857e1180671fe6cf501ac496bcf 100644 (file)
@@ -446,9 +446,9 @@ void __ecryptfs_printk(const char *fmt, ...);
 
 extern const struct file_operations ecryptfs_main_fops;
 extern const struct file_operations ecryptfs_dir_fops;
-extern struct inode_operations ecryptfs_main_iops;
-extern struct inode_operations ecryptfs_dir_iops;
-extern struct inode_operations ecryptfs_symlink_iops;
+extern const struct inode_operations ecryptfs_main_iops;
+extern const struct inode_operations ecryptfs_dir_iops;
+extern const struct inode_operations ecryptfs_symlink_iops;
 extern struct super_operations ecryptfs_sops;
 extern struct dentry_operations ecryptfs_dops;
 extern struct address_space_operations ecryptfs_aops;
index 91357183398dc9343e5fbb558732abdcd0b00eef..9fa7e0b27a96ee57ae08187e17b6872b79d39fd4 100644 (file)
@@ -989,7 +989,7 @@ int ecryptfs_inode_set(struct inode *inode, void *lower_inode)
        return 0;
 }
 
-struct inode_operations ecryptfs_symlink_iops = {
+const struct inode_operations ecryptfs_symlink_iops = {
        .readlink = ecryptfs_readlink,
        .follow_link = ecryptfs_follow_link,
        .put_link = ecryptfs_put_link,
@@ -1001,7 +1001,7 @@ struct inode_operations ecryptfs_symlink_iops = {
        .removexattr = ecryptfs_removexattr
 };
 
-struct inode_operations ecryptfs_dir_iops = {
+const struct inode_operations ecryptfs_dir_iops = {
        .create = ecryptfs_create,
        .lookup = ecryptfs_lookup,
        .link = ecryptfs_link,
@@ -1019,7 +1019,7 @@ struct inode_operations ecryptfs_dir_iops = {
        .removexattr = ecryptfs_removexattr
 };
 
-struct inode_operations ecryptfs_main_iops = {
+const struct inode_operations ecryptfs_main_iops = {
        .permission = ecryptfs_permission,
        .setattr = ecryptfs_setattr,
        .setxattr = ecryptfs_setxattr,
index b46c488eefc881d707a99c375b77a741ffbb3b0d..dfb5cb400217c983dba9a6503ca1f098db07758e 100644 (file)
@@ -15,7 +15,7 @@ const struct file_operations efs_dir_operations = {
        .readdir        = efs_readdir,
 };
 
-struct inode_operations efs_dir_inode_operations = {
+const struct inode_operations efs_dir_inode_operations = {
        .lookup         = efs_lookup,
 };
 
index c19ac153f56b72c38d564de76a4616a4f599d9e6..e2a0ea50af1dc6039ad22dc75b62a99ac78002fc 100644 (file)
@@ -158,7 +158,7 @@ extern void ext2_write_super (struct super_block *);
 extern const struct file_operations ext2_dir_operations;
 
 /* file.c */
-extern struct inode_operations ext2_file_inode_operations;
+extern const struct inode_operations ext2_file_inode_operations;
 extern const struct file_operations ext2_file_operations;
 extern const struct file_operations ext2_xip_file_operations;
 
@@ -168,9 +168,9 @@ extern const struct address_space_operations ext2_aops_xip;
 extern const struct address_space_operations ext2_nobh_aops;
 
 /* namei.c */
-extern struct inode_operations ext2_dir_inode_operations;
-extern struct inode_operations ext2_special_inode_operations;
+extern const struct inode_operations ext2_dir_inode_operations;
+extern const struct inode_operations ext2_special_inode_operations;
 
 /* symlink.c */
-extern struct inode_operations ext2_fast_symlink_inode_operations;
-extern struct inode_operations ext2_symlink_inode_operations;
+extern const struct inode_operations ext2_fast_symlink_inode_operations;
+extern const struct inode_operations ext2_symlink_inode_operations;
index 2dba473c524ad33282402305b6b1afe837caf5d3..566d4e2d3852353d4e54032c417b6bd593d72fa2 100644 (file)
@@ -75,7 +75,7 @@ const struct file_operations ext2_xip_file_operations = {
 };
 #endif
 
-struct inode_operations ext2_file_inode_operations = {
+const struct inode_operations ext2_file_inode_operations = {
        .truncate       = ext2_truncate,
 #ifdef CONFIG_EXT2_FS_XATTR
        .setxattr       = generic_setxattr,
index e1af5b4cf80c100c26ce08a559bbdab12de8753b..e69beed839acb9bccbfc9f1f68c6bb2be9fdb5de 100644 (file)
@@ -373,7 +373,7 @@ out:
        return err;
 }
 
-struct inode_operations ext2_dir_inode_operations = {
+const struct inode_operations ext2_dir_inode_operations = {
        .create         = ext2_create,
        .lookup         = ext2_lookup,
        .link           = ext2_link,
@@ -393,7 +393,7 @@ struct inode_operations ext2_dir_inode_operations = {
        .permission     = ext2_permission,
 };
 
-struct inode_operations ext2_special_inode_operations = {
+const struct inode_operations ext2_special_inode_operations = {
 #ifdef CONFIG_EXT2_FS_XATTR
        .setxattr       = generic_setxattr,
        .getxattr       = generic_getxattr,
index 1e67d87cfa913b58c648a586235816350481fed5..4e2426e22bbe6377d6f853d9fed196afdd9971cf 100644 (file)
@@ -28,7 +28,7 @@ static void *ext2_follow_link(struct dentry *dentry, struct nameidata *nd)
        return NULL;
 }
 
-struct inode_operations ext2_symlink_inode_operations = {
+const struct inode_operations ext2_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = page_follow_link_light,
        .put_link       = page_put_link,
@@ -40,7 +40,7 @@ struct inode_operations ext2_symlink_inode_operations = {
 #endif
 };
  
-struct inode_operations ext2_fast_symlink_inode_operations = {
+const struct inode_operations ext2_fast_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = ext2_follow_link,
 #ifdef CONFIG_EXT2_FS_XATTR
index 881f6365c41a329724b0a93fec4028eebec66d29..1e6f13864536e7180a465ace2ce6555256d7292f 100644 (file)
@@ -125,7 +125,7 @@ const struct file_operations ext3_file_operations = {
        .splice_write   = generic_file_splice_write,
 };
 
-struct inode_operations ext3_file_inode_operations = {
+const struct inode_operations ext3_file_inode_operations = {
        .truncate       = ext3_truncate,
        .setattr        = ext3_setattr,
 #ifdef CONFIG_EXT3_FS_XATTR
index a8e89328e66d1ca6754417afbf54696460b24797..49159f13cc1f900d4b514a265ea3e97cbaf811a4 100644 (file)
@@ -2365,7 +2365,7 @@ end_rename:
 /*
  * directories can handle most operations...
  */
-struct inode_operations ext3_dir_inode_operations = {
+const struct inode_operations ext3_dir_inode_operations = {
        .create         = ext3_create,
        .lookup         = ext3_lookup,
        .link           = ext3_link,
@@ -2385,7 +2385,7 @@ struct inode_operations ext3_dir_inode_operations = {
        .permission     = ext3_permission,
 };
 
-struct inode_operations ext3_special_inode_operations = {
+const struct inode_operations ext3_special_inode_operations = {
        .setattr        = ext3_setattr,
 #ifdef CONFIG_EXT3_FS_XATTR
        .setxattr       = generic_setxattr,
index 4f79122cde670558c39a6886623c7522286b9854..ff7b4ccd898383715e9db7348bd95e9ce4162cee 100644 (file)
@@ -30,7 +30,7 @@ static void * ext3_follow_link(struct dentry *dentry, struct nameidata *nd)
        return NULL;
 }
 
-struct inode_operations ext3_symlink_inode_operations = {
+const struct inode_operations ext3_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = page_follow_link_light,
        .put_link       = page_put_link,
@@ -42,7 +42,7 @@ struct inode_operations ext3_symlink_inode_operations = {
 #endif
 };
 
-struct inode_operations ext3_fast_symlink_inode_operations = {
+const struct inode_operations ext3_fast_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = ext3_follow_link,
 #ifdef CONFIG_EXT3_FS_XATTR
index 3bbc24b587858b97f6ebb0b492b65091158b77c2..3c6c1fd2be902524eb1901776aa8a0b45db4a167 100644 (file)
@@ -125,7 +125,7 @@ const struct file_operations ext4_file_operations = {
        .splice_write   = generic_file_splice_write,
 };
 
-struct inode_operations ext4_file_inode_operations = {
+const struct inode_operations ext4_file_inode_operations = {
        .truncate       = ext4_truncate,
        .setattr        = ext4_setattr,
 #ifdef CONFIG_EXT4DEV_FS_XATTR
index 34b3448b40f91d608d80b4fb935e6fae218e35f8..e7e1d79a7d75496c3f0bff48eb6680a6ff2703e9 100644 (file)
@@ -2363,7 +2363,7 @@ end_rename:
 /*
  * directories can handle most operations...
  */
-struct inode_operations ext4_dir_inode_operations = {
+const struct inode_operations ext4_dir_inode_operations = {
        .create         = ext4_create,
        .lookup         = ext4_lookup,
        .link           = ext4_link,
@@ -2383,7 +2383,7 @@ struct inode_operations ext4_dir_inode_operations = {
        .permission     = ext4_permission,
 };
 
-struct inode_operations ext4_special_inode_operations = {
+const struct inode_operations ext4_special_inode_operations = {
        .setattr        = ext4_setattr,
 #ifdef CONFIG_EXT4DEV_FS_XATTR
        .setxattr       = generic_setxattr,
index fcf527286d7517999fede004d2e321b1356f0c3a..e6f9da4287c455d5975a87668d90dff7e1dcd766 100644 (file)
@@ -30,7 +30,7 @@ static void * ext4_follow_link(struct dentry *dentry, struct nameidata *nd)
        return NULL;
 }
 
-struct inode_operations ext4_symlink_inode_operations = {
+const struct inode_operations ext4_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = page_follow_link_light,
        .put_link       = page_put_link,
@@ -42,7 +42,7 @@ struct inode_operations ext4_symlink_inode_operations = {
 #endif
 };
 
-struct inode_operations ext4_fast_symlink_inode_operations = {
+const struct inode_operations ext4_fast_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = ext4_follow_link,
 #ifdef CONFIG_EXT4DEV_FS_XATTR
index c1237b70c1fee7c11f06182f67d20b5a9f6a700f..55d3c7461c5b9acb50b851fae64df4a68dcd3d01 100644 (file)
@@ -312,7 +312,7 @@ int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
 }
 EXPORT_SYMBOL_GPL(fat_getattr);
 
-struct inode_operations fat_file_inode_operations = {
+const struct inode_operations fat_file_inode_operations = {
        .truncate       = fat_truncate,
        .setattr        = fat_notify_change,
        .getattr        = fat_getattr,
index a9e4688582a2599a7c1df7f3579aa15fe4632a87..f268fec6ed0a77d66294efc9cbaf1f04282e2b9c 100644 (file)
@@ -1151,7 +1151,7 @@ static int fat_read_root(struct inode *inode)
  * Read the super block of an MS-DOS FS.
  */
 int fat_fill_super(struct super_block *sb, void *data, int silent,
-                  struct inode_operations *fs_dir_inode_ops, int isvfat)
+                  const struct inode_operations *fs_dir_inode_ops, int isvfat)
 {
        struct inode *root_inode = NULL;
        struct buffer_head *bh;
index 1cf1fe8466a2c9f0efbb28e06e3cfe0c4f21c99e..91ccee8723f7cdd9cbacb3f3a070624e2053ca20 100644 (file)
@@ -62,7 +62,7 @@ extern void                   vxfs_read_inode(struct inode *);
 extern void                    vxfs_clear_inode(struct inode *);
 
 /* vxfs_lookup.c */
-extern struct inode_operations vxfs_dir_inode_ops;
+extern const struct inode_operations   vxfs_dir_inode_ops;
 extern const struct file_operations    vxfs_dir_operations;
 
 /* vxfs_olt.c */
index 4e25f3fbed86c71d7a92722ea00bfbb82711860f..24b5a775ff960493a60df4d6c1cb36bdf54010be 100644 (file)
@@ -48,7 +48,7 @@ static int    vxfs_immed_readpage(struct file *, struct page *);
  * Unliked all other operations we do not go through the pagecache,
  * but do all work directly on the inode.
  */
-struct inode_operations vxfs_immed_symlink_iops = {
+const struct inode_operations vxfs_immed_symlink_iops = {
        .readlink =             generic_readlink,
        .follow_link =          vxfs_immed_follow_link,
 };
index 0b7ae897cb781ab9c55beff17bda465dec9b6a48..098a915fd9a1da65aeb0902350bee828fab46996 100644 (file)
@@ -44,7 +44,7 @@
 extern const struct address_space_operations vxfs_aops;
 extern const struct address_space_operations vxfs_immed_aops;
 
-extern struct inode_operations vxfs_immed_symlink_iops;
+extern const struct inode_operations vxfs_immed_symlink_iops;
 
 struct kmem_cache              *vxfs_inode_cachep;
 
index 3995d7fbedab6b18be5a48d04c1f3edd446527f3..bf86e5444ea6d705a99682b83987b586a40a1e04 100644 (file)
@@ -52,7 +52,7 @@
 static struct dentry * vxfs_lookup(struct inode *, struct dentry *, struct nameidata *);
 static int             vxfs_readdir(struct file *, void *, filldir_t);
 
-struct inode_operations vxfs_dir_inode_ops = {
+const struct inode_operations vxfs_dir_inode_ops = {
        .lookup =               vxfs_lookup,
 };
 
index 1794305f9ed86696f7505afdb90f591f32181e1c..105d4a271e073b0c7d60660057d9716d798f9d1d 100644 (file)
@@ -73,7 +73,7 @@ static struct dentry *fuse_ctl_add_dentry(struct dentry *parent,
                                          struct fuse_conn *fc,
                                          const char *name,
                                          int mode, int nlink,
-                                         struct inode_operations *iop,
+                                         const struct inode_operations *iop,
                                          const struct file_operations *fop)
 {
        struct dentry *dentry;
index 40080477ceb4fa5a2fed48f0da0c446c10614bb5..406bf61ed510ffbe66def51015943de76d1c3094 100644 (file)
@@ -1242,7 +1242,7 @@ static int fuse_removexattr(struct dentry *entry, const char *name)
        return err;
 }
 
-static struct inode_operations fuse_dir_inode_operations = {
+static const struct inode_operations fuse_dir_inode_operations = {
        .lookup         = fuse_lookup,
        .mkdir          = fuse_mkdir,
        .symlink        = fuse_symlink,
@@ -1270,7 +1270,7 @@ static const struct file_operations fuse_dir_operations = {
        .fsync          = fuse_dir_fsync,
 };
 
-static struct inode_operations fuse_common_inode_operations = {
+static const struct inode_operations fuse_common_inode_operations = {
        .setattr        = fuse_setattr,
        .permission     = fuse_permission,
        .getattr        = fuse_getattr,
@@ -1280,7 +1280,7 @@ static struct inode_operations fuse_common_inode_operations = {
        .removexattr    = fuse_removexattr,
 };
 
-static struct inode_operations fuse_symlink_inode_operations = {
+static const struct inode_operations fuse_symlink_inode_operations = {
        .setattr        = fuse_setattr,
        .follow_link    = fuse_follow_link,
        .put_link       = fuse_put_link,