]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] mark struct inode_operations const 2
authorArjan van de Ven <arjan@linux.intel.com>
Mon, 12 Feb 2007 08:55:39 +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>
54 files changed:
fs/gfs2/ops_inode.c
fs/gfs2/ops_inode.h
fs/hfs/dir.c
fs/hfs/hfs_fs.h
fs/hfs/inode.c
fs/hfsplus/dir.c
fs/hfsplus/inode.c
fs/hostfs/hostfs_kern.c
fs/hpfs/file.c
fs/hpfs/hpfs_fn.h
fs/hpfs/namei.c
fs/hppfs/hppfs_kern.c
fs/hugetlbfs/inode.c
fs/isofs/dir.c
fs/isofs/isofs.h
fs/jffs/inode-v23.c
fs/jffs2/dir.c
fs/jffs2/file.c
fs/jffs2/os-linux.h
fs/jffs2/symlink.c
fs/jfs/file.c
fs/jfs/jfs_inode.h
fs/jfs/namei.c
fs/jfs/symlink.c
fs/libfs.c
fs/minix/file.c
fs/minix/inode.c
fs/minix/minix.h
fs/minix/namei.c
fs/msdos/namei.c
fs/namei.c
fs/ncpfs/dir.c
fs/ncpfs/file.c
fs/ncpfs/inode.c
fs/nfs/dir.c
fs/nfs/file.c
fs/nfs/namespace.c
fs/nfs/nfs4_fs.h
fs/nfs/nfs4proc.c
fs/nfs/symlink.c
fs/ntfs/file.c
fs/ntfs/namei.c
fs/ntfs/ntfs.h
fs/ocfs2/dlm/dlmfs.c
fs/ocfs2/file.c
fs/ocfs2/file.h
fs/ocfs2/namei.c
fs/ocfs2/namei.h
fs/ocfs2/symlink.c
fs/ocfs2/symlink.h
fs/openpromfs/inode.c
ipc/mqueue.c
kernel/cpuset.c
mm/shmem.c

index f40a84807d75468f5b9a302d9b3bf9d1a07f2618..60f47bf2e8e8cabf86c38d2e94c77c6a2893a72c 100644 (file)
@@ -1115,7 +1115,7 @@ static int gfs2_removexattr(struct dentry *dentry, const char *name)
        return gfs2_ea_remove(GFS2_I(dentry->d_inode), &er);
 }
 
-struct inode_operations gfs2_file_iops = {
+const struct inode_operations gfs2_file_iops = {
        .permission = gfs2_permission,
        .setattr = gfs2_setattr,
        .getattr = gfs2_getattr,
@@ -1125,7 +1125,7 @@ struct inode_operations gfs2_file_iops = {
        .removexattr = gfs2_removexattr,
 };
 
-struct inode_operations gfs2_dev_iops = {
+const struct inode_operations gfs2_dev_iops = {
        .permission = gfs2_permission,
        .setattr = gfs2_setattr,
        .getattr = gfs2_getattr,
@@ -1135,7 +1135,7 @@ struct inode_operations gfs2_dev_iops = {
        .removexattr = gfs2_removexattr,
 };
 
-struct inode_operations gfs2_dir_iops = {
+const struct inode_operations gfs2_dir_iops = {
        .create = gfs2_create,
        .lookup = gfs2_lookup,
        .link = gfs2_link,
@@ -1154,7 +1154,7 @@ struct inode_operations gfs2_dir_iops = {
        .removexattr = gfs2_removexattr,
 };
 
-struct inode_operations gfs2_symlink_iops = {
+const struct inode_operations gfs2_symlink_iops = {
        .readlink = gfs2_readlink,
        .follow_link = gfs2_follow_link,
        .permission = gfs2_permission,
index b15acb4fd34c9bbda673e345c066d74396c2ebb4..34f0caac1a030f2453a7e84df95cc3a6509c4098 100644 (file)
@@ -12,9 +12,9 @@
 
 #include <linux/fs.h>
 
-extern struct inode_operations gfs2_file_iops;
-extern struct inode_operations gfs2_dir_iops;
-extern struct inode_operations gfs2_symlink_iops;
-extern struct inode_operations gfs2_dev_iops;
+extern const struct inode_operations gfs2_file_iops;
+extern const struct inode_operations gfs2_dir_iops;
+extern const struct inode_operations gfs2_symlink_iops;
+extern const struct inode_operations gfs2_dev_iops;
 
 #endif /* __OPS_INODE_DOT_H__ */
index e2e0358da335f51503fb8527a32d115c2f56204a..7c69b98a2e45b679cc97b87e00247fa40442c2d8 100644 (file)
@@ -320,7 +320,7 @@ const struct file_operations hfs_dir_operations = {
        .release        = hfs_dir_release,
 };
 
-struct inode_operations hfs_dir_inode_operations = {
+const struct inode_operations hfs_dir_inode_operations = {
        .create         = hfs_create,
        .lookup         = hfs_lookup,
        .unlink         = hfs_unlink,
index 735332dfd1b8a70283d1c02b0de09b3272b485d7..147374b6f67525871efd8f7abb8320bd838a3be4 100644 (file)
@@ -170,7 +170,7 @@ extern void hfs_cat_build_key(struct super_block *, btree_key *, u32, struct qst
 
 /* dir.c */
 extern const struct file_operations hfs_dir_operations;
-extern struct inode_operations hfs_dir_inode_operations;
+extern const struct inode_operations hfs_dir_inode_operations;
 
 /* extent.c */
 extern int hfs_ext_keycmp(const btree_key *, const btree_key *);
index 5cb7f8fee8d6501d53e8a1931a07feafb502f8c6..fafcba593871889efb1e193e4b818515e40725ca 100644 (file)
@@ -18,7 +18,7 @@
 #include "btree.h"
 
 static const struct file_operations hfs_file_operations;
-static struct inode_operations hfs_file_inode_operations;
+static const struct inode_operations hfs_file_inode_operations;
 
 /*================ Variable-like macros ================*/
 
@@ -612,7 +612,7 @@ static const struct file_operations hfs_file_operations = {
        .release        = hfs_file_release,
 };
 
-static struct inode_operations hfs_file_inode_operations = {
+static const struct inode_operations hfs_file_inode_operations = {
        .lookup         = hfs_file_lookup,
        .truncate       = hfs_file_truncate,
        .setattr        = hfs_inode_setattr,
index e886ac8460d375ccda11f4a005aefffe34b60bcd..78137007ccc1f2ce2415f616997b6c5c935094a7 100644 (file)
@@ -471,7 +471,7 @@ static int hfsplus_rename(struct inode *old_dir, struct dentry *old_dentry,
        return res;
 }
 
-struct inode_operations hfsplus_dir_inode_operations = {
+const struct inode_operations hfsplus_dir_inode_operations = {
        .lookup         = hfsplus_lookup,
        .create         = hfsplus_create,
        .link           = hfsplus_link,
index 75e8c4d8aac35d31ab65bbd01e5bb36d8a86c383..642012ac337013e06acbb74334ce20b3b9915c2f 100644 (file)
@@ -268,10 +268,10 @@ static int hfsplus_file_release(struct inode *inode, struct file *file)
        return 0;
 }
 
-extern struct inode_operations hfsplus_dir_inode_operations;
+extern const struct inode_operations hfsplus_dir_inode_operations;
 extern struct file_operations hfsplus_dir_operations;
 
-static struct inode_operations hfsplus_file_inode_operations = {
+static const struct inode_operations hfsplus_file_inode_operations = {
        .lookup         = hfsplus_file_lookup,
        .truncate       = hfsplus_file_truncate,
        .permission     = hfsplus_permission,
index 69a376f35a687796fb753d963f0c8df9c818c7d7..fec208db5e467e32ac6f512c5664e4bdc0960edc 100644 (file)
@@ -52,8 +52,8 @@ static int append = 0;
 
 #define HOSTFS_SUPER_MAGIC 0x00c0ffee
 
-static struct inode_operations hostfs_iops;
-static struct inode_operations hostfs_dir_iops;
+static const struct inode_operations hostfs_iops;
+static const struct inode_operations hostfs_dir_iops;
 static const struct address_space_operations hostfs_link_aops;
 
 #ifndef MODULE
@@ -880,7 +880,7 @@ int hostfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
        return(0);
 }
 
-static struct inode_operations hostfs_iops = {
+static const struct inode_operations hostfs_iops = {
        .create         = hostfs_create,
        .link           = hostfs_link,
        .unlink         = hostfs_unlink,
@@ -894,7 +894,7 @@ static struct inode_operations hostfs_iops = {
        .getattr        = hostfs_getattr,
 };
 
-static struct inode_operations hostfs_dir_iops = {
+static const struct inode_operations hostfs_dir_iops = {
        .create         = hostfs_create,
        .lookup         = hostfs_lookup,
        .link           = hostfs_link,
index fb4c8915010a4a99c9daf905f58522026b37895c..b4eafc0f1e54b40007b9831a6661012cfaa0ebe0 100644 (file)
@@ -132,7 +132,7 @@ const struct file_operations hpfs_file_ops =
        .sendfile       = generic_file_sendfile,
 };
 
-struct inode_operations hpfs_file_iops =
+const struct inode_operations hpfs_file_iops =
 {
        .truncate       = hpfs_truncate,
        .setattr        = hpfs_notify_change,
index 1c07aa82d32787ef3e7751c1f04c11ce0e8e8483..42ff60ccf2a9f63b50643da396b6918a67fa3e10 100644 (file)
@@ -266,7 +266,7 @@ void hpfs_set_ea(struct inode *, struct fnode *, char *, char *, int);
 
 int hpfs_file_fsync(struct file *, struct dentry *, int);
 extern const struct file_operations hpfs_file_ops;
-extern struct inode_operations hpfs_file_iops;
+extern const struct inode_operations hpfs_file_iops;
 extern const struct address_space_operations hpfs_aops;
 
 /* inode.c */
@@ -302,7 +302,7 @@ void hpfs_decide_conv(struct inode *, unsigned char *, unsigned);
 
 /* namei.c */
 
-extern struct inode_operations hpfs_dir_iops;
+extern const struct inode_operations hpfs_dir_iops;
 extern const struct address_space_operations hpfs_symlink_aops;
 
 static inline struct hpfs_inode_info *hpfs_i(struct inode *inode)
index 2507e7393f3c6733ebda781bfea8be1d8459e927..9953cf9a2f16fa1f5b45709c142d2699452c9576 100644 (file)
@@ -659,7 +659,7 @@ end1:
        return err;
 }
 
-struct inode_operations hpfs_dir_iops =
+const struct inode_operations hpfs_dir_iops =
 {
        .create         = hpfs_create,
        .lookup         = hpfs_lookup,
index afd340a45da461ea47e7cc4ef4d8736417441511..bd711681631478d23f77ffc0c7af0f423e7bb8cb 100644 (file)
@@ -212,7 +212,7 @@ static struct dentry *hppfs_lookup(struct inode *ino, struct dentry *dentry,
        return(ERR_PTR(err));
 }
 
-static struct inode_operations hppfs_file_iops = {
+static const struct inode_operations hppfs_file_iops = {
 };
 
 static ssize_t read_proc(struct file *file, char __user *buf, ssize_t count,
@@ -693,11 +693,11 @@ static void* hppfs_follow_link(struct dentry *dentry, struct nameidata *nd)
        return ret;
 }
 
-static struct inode_operations hppfs_dir_iops = {
+static const struct inode_operations hppfs_dir_iops = {
        .lookup         = hppfs_lookup,
 };
 
-static struct inode_operations hppfs_link_iops = {
+static const struct inode_operations hppfs_link_iops = {
        .readlink       = hppfs_readlink,
        .follow_link    = hppfs_follow_link,
 };
index e6bd553fdc4cf29214e6f2b3a7fe50817e9e8d80..26ba81fc7fabb73c909ab6691e599f7e06084e68 100644 (file)
@@ -36,8 +36,8 @@
 static struct super_operations hugetlbfs_ops;
 static const struct address_space_operations hugetlbfs_aops;
 const struct file_operations hugetlbfs_file_operations;
-static struct inode_operations hugetlbfs_dir_inode_operations;
-static struct inode_operations hugetlbfs_inode_operations;
+static const struct inode_operations hugetlbfs_dir_inode_operations;
+static const struct inode_operations hugetlbfs_inode_operations;
 
 static struct backing_dev_info hugetlbfs_backing_dev_info = {
        .ra_pages       = 0,    /* No readahead */
@@ -563,7 +563,7 @@ const struct file_operations hugetlbfs_file_operations = {
        .get_unmapped_area      = hugetlb_get_unmapped_area,
 };
 
-static struct inode_operations hugetlbfs_dir_inode_operations = {
+static const struct inode_operations hugetlbfs_dir_inode_operations = {
        .create         = hugetlbfs_create,
        .lookup         = simple_lookup,
        .link           = simple_link,
@@ -576,7 +576,7 @@ static struct inode_operations hugetlbfs_dir_inode_operations = {
        .setattr        = hugetlbfs_setattr,
 };
 
-static struct inode_operations hugetlbfs_inode_operations = {
+static const struct inode_operations hugetlbfs_inode_operations = {
        .setattr        = hugetlbfs_setattr,
 };
 
index 4af2548f97a97d4b6149208148302886b55933a8..0e94c31cad9bca5879cda7784c57a33a0a55f4ae 100644 (file)
@@ -24,7 +24,7 @@ const struct file_operations isofs_dir_operations =
 /*
  * directories can handle most operations...
  */
-struct inode_operations isofs_dir_inode_operations =
+const struct inode_operations isofs_dir_inode_operations =
 {
        .lookup         = isofs_lookup,
 };
index e6308c8b57359e728be75de3e23d9e1b2cb974fb..efe2872cd4e3179067073e98ac6a296776c38117 100644 (file)
@@ -174,7 +174,7 @@ isofs_normalize_block_and_offset(struct iso_directory_record* de,
        }
 }
 
-extern struct inode_operations isofs_dir_inode_operations;
+extern const struct inode_operations isofs_dir_inode_operations;
 extern const struct file_operations isofs_dir_operations;
 extern const struct address_space_operations isofs_symlink_aops;
 extern struct export_operations isofs_export_ops;
index 6ee20668850209157be503192066ae9d357d16dd..fe3347defe6c54c24704f33a47f977080753a99f 100644 (file)
@@ -56,9 +56,9 @@ static int jffs_remove(struct inode *dir, struct dentry *dentry, int type);
 
 static struct super_operations jffs_ops;
 static const struct file_operations jffs_file_operations;
-static struct inode_operations jffs_file_inode_operations;
+static const struct inode_operations jffs_file_inode_operations;
 static const struct file_operations jffs_dir_operations;
-static struct inode_operations jffs_dir_inode_operations;
+static const struct inode_operations jffs_dir_inode_operations;
 static const struct address_space_operations jffs_address_operations;
 
 struct kmem_cache     *node_cache = NULL;
@@ -1642,7 +1642,7 @@ static const struct file_operations jffs_file_operations =
 };
 
 
-static struct inode_operations jffs_file_inode_operations =
+static const struct inode_operations jffs_file_inode_operations =
 {
        .lookup         = jffs_lookup,          /* lookup */
        .setattr        = jffs_setattr,
@@ -1655,7 +1655,7 @@ static const struct file_operations jffs_dir_operations =
 };
 
 
-static struct inode_operations jffs_dir_inode_operations =
+static const struct inode_operations jffs_dir_inode_operations =
 {
        .create         = jffs_create,
        .lookup         = jffs_lookup,
index da6034d50718dad0f06bac3c5004f60d0124479d..cdbe2fe14e2d185fe4763d6afeebb3bfb9a3d2b3 100644 (file)
@@ -46,7 +46,7 @@ const struct file_operations jffs2_dir_operations =
 };
 
 
-struct inode_operations jffs2_dir_inode_operations =
+const struct inode_operations jffs2_dir_inode_operations =
 {
        .create =       jffs2_create,
        .lookup =       jffs2_lookup,
index 242875f77cb38261fec2c2da5e35e3db08b15773..e82eeaf7590d59891ae21560307d461786b02e9f 100644 (file)
@@ -54,7 +54,7 @@ const struct file_operations jffs2_file_operations =
 
 /* jffs2_file_inode_operations */
 
-struct inode_operations jffs2_file_inode_operations =
+const struct inode_operations jffs2_file_inode_operations =
 {
        .permission =   jffs2_permission,
        .setattr =      jffs2_setattr,
index 9f41fc01a371b7b1a87d1eff853db3cc46d0018c..e07a0edcdb4f5c7fc24b15028bdfb8d177b8a14e 100644 (file)
@@ -153,11 +153,11 @@ void jffs2_garbage_collect_trigger(struct jffs2_sb_info *c);
 
 /* dir.c */
 extern const struct file_operations jffs2_dir_operations;
-extern struct inode_operations jffs2_dir_inode_operations;
+extern const struct inode_operations jffs2_dir_inode_operations;
 
 /* file.c */
 extern const struct file_operations jffs2_file_operations;
-extern struct inode_operations jffs2_file_inode_operations;
+extern const struct inode_operations jffs2_file_inode_operations;
 extern const struct address_space_operations jffs2_file_address_operations;
 int jffs2_fsync(struct file *, struct dentry *, int);
 int jffs2_do_readpage_unlock (struct inode *inode, struct page *pg);
@@ -166,7 +166,7 @@ int jffs2_do_readpage_unlock (struct inode *inode, struct page *pg);
 int jffs2_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
 
 /* symlink.c */
-extern struct inode_operations jffs2_symlink_inode_operations;
+extern const struct inode_operations jffs2_symlink_inode_operations;
 
 /* fs.c */
 int jffs2_setattr (struct dentry *, struct iattr *);
index b90d5aa3d96972a14fbd144c933cd894a4df69ca..7e4882c8a7ed2418de322a49952b9f5df8bcf10c 100644 (file)
@@ -20,7 +20,7 @@
 
 static void *jffs2_follow_link(struct dentry *dentry, struct nameidata *nd);
 
-struct inode_operations jffs2_symlink_inode_operations =
+const struct inode_operations jffs2_symlink_inode_operations =
 {
        .readlink =     generic_readlink,
        .follow_link =  jffs2_follow_link,
index aa9132d04920f679c47b2c1d0e1eed56851ded77..f7f8eff19b7b2c4358fc58053b827fb5becd8d37 100644 (file)
@@ -88,7 +88,7 @@ static int jfs_release(struct inode *inode, struct file *file)
        return 0;
 }
 
-struct inode_operations jfs_file_inode_operations = {
+const struct inode_operations jfs_file_inode_operations = {
        .truncate       = jfs_truncate,
        .setxattr       = jfs_setxattr,
        .getxattr       = jfs_getxattr,
index 0d06ccfaff0e7cf69935e556643f6176c99d4c4b..6802837f757ee17c7bc6914e8f2d03228c23f870 100644 (file)
@@ -35,10 +35,10 @@ extern void jfs_set_inode_flags(struct inode *);
 extern int jfs_get_block(struct inode *, sector_t, struct buffer_head *, int);
 
 extern const struct address_space_operations jfs_aops;
-extern struct inode_operations jfs_dir_inode_operations;
+extern const struct inode_operations jfs_dir_inode_operations;
 extern const struct file_operations jfs_dir_operations;
-extern struct inode_operations jfs_file_inode_operations;
+extern const struct inode_operations jfs_file_inode_operations;
 extern const struct file_operations jfs_file_operations;
-extern struct inode_operations jfs_symlink_inode_operations;
+extern const struct inode_operations jfs_symlink_inode_operations;
 extern struct dentry_operations jfs_ci_dentry_operations;
 #endif                         /* _H_JFS_INODE */
index 7ab47561b68df5cbc68c603798cc297a88076b46..41c20477126237384bcf4421a0a6ae42765adbe7 100644 (file)
@@ -1503,7 +1503,7 @@ struct dentry *jfs_get_parent(struct dentry *dentry)
        return parent;
 }
 
-struct inode_operations jfs_dir_inode_operations = {
+const struct inode_operations jfs_dir_inode_operations = {
        .create         = jfs_create,
        .lookup         = jfs_lookup,
        .link           = jfs_link,
index cee43f36f51d526843271398356dfb3bef030ce0..4af1a05aad0af2445658df5cbbf765c61d37b627 100644 (file)
@@ -29,7 +29,7 @@ static void *jfs_follow_link(struct dentry *dentry, struct nameidata *nd)
        return NULL;
 }
 
-struct inode_operations jfs_symlink_inode_operations = {
+const struct inode_operations jfs_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = jfs_follow_link,
        .setxattr       = jfs_setxattr,
index 503898d5c4a748226e2f17e2cd9c8ab4ee081b87..0f4ee02e0b16fb3a1b0813e49dce4c88702a1b0e 100644 (file)
@@ -186,7 +186,7 @@ const struct file_operations simple_dir_operations = {
        .fsync          = simple_sync_file,
 };
 
-struct inode_operations simple_dir_inode_operations = {
+const struct inode_operations simple_dir_inode_operations = {
        .lookup         = simple_lookup,
 };
 
index 40eac2e60d25deb803bebfbd4712e5caae5a65b6..f92baa1d757053cd7f1b3964bf73cafcd74f7047 100644 (file)
@@ -26,7 +26,7 @@ const struct file_operations minix_file_operations = {
        .sendfile       = generic_file_sendfile,
 };
 
-struct inode_operations minix_file_inode_operations = {
+const struct inode_operations minix_file_inode_operations = {
        .truncate       = minix_truncate,
        .getattr        = minix_getattr,
 };
index 9ddfcc14828799d7adedb30d44bf0d0a9ae64da2..e56822bff9481ac3807c860e4abb8e9b891c7abe 100644 (file)
@@ -369,7 +369,7 @@ static const struct address_space_operations minix_aops = {
        .bmap = minix_bmap
 };
 
-static struct inode_operations minix_symlink_inode_operations = {
+static const struct inode_operations minix_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = page_follow_link_light,
        .put_link       = page_put_link,
index e016ee91d936e97472fce329ee82bba196e85610..73ef84f8fb0bb7fff4583b9a96c6b0a81dcee0cb 100644 (file)
@@ -75,8 +75,8 @@ extern struct minix_dir_entry *minix_dotdot(struct inode*, struct page**);
 extern ino_t minix_inode_by_name(struct dentry*);
 extern int minix_sync_file(struct file *, struct dentry *, int);
 
-extern struct inode_operations minix_file_inode_operations;
-extern struct inode_operations minix_dir_inode_operations;
+extern const struct inode_operations minix_file_inode_operations;
+extern const struct inode_operations minix_dir_inode_operations;
 extern const struct file_operations minix_file_operations;
 extern const struct file_operations minix_dir_operations;
 extern struct dentry_operations minix_dentry_operations;
index 299bb66e3bde55a880435c5dee0c315cfbdced0d..f4aa7a9390406b9f27cbd2fc9aaa4ddbc48dcf8d 100644 (file)
@@ -291,7 +291,7 @@ out:
 /*
  * directories can handle most operations...
  */
-struct inode_operations minix_dir_inode_operations = {
+const struct inode_operations minix_dir_inode_operations = {
        .create         = minix_create,
        .lookup         = minix_lookup,
        .link           = minix_link,
index 452461955cbdced2ba1c4df8d936966fbb08e848..30f7d0ae221551b95024ceae92ae9078f30b5484 100644 (file)
@@ -646,7 +646,7 @@ out:
        return err;
 }
 
-static struct inode_operations msdos_dir_inode_operations = {
+static const struct inode_operations msdos_dir_inode_operations = {
        .create         = msdos_create,
        .lookup         = msdos_lookup,
        .unlink         = msdos_unlink,
index e4f108f082303c99023c3b950e8f8f3202551a4c..161e2225c75702f1f2ba88e97a2d21d1155da1a3 100644 (file)
@@ -2744,7 +2744,7 @@ int page_symlink(struct inode *inode, const char *symname, int len)
                        mapping_gfp_mask(inode->i_mapping));
 }
 
-struct inode_operations page_symlink_inode_operations = {
+const struct inode_operations page_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = page_follow_link_light,
        .put_link       = page_put_link,
index 73747772c3bb23434ea8bdc2cb4a9630fffea3f2..011ef0b6d2d48eb9fcc391fc9180ceb4d34d4f6a 100644 (file)
@@ -58,7 +58,7 @@ const struct file_operations ncp_dir_operations =
 #endif
 };
 
-struct inode_operations ncp_dir_inode_operations =
+const struct inode_operations ncp_dir_inode_operations =
 {
        .create         = ncp_create,
        .lookup         = ncp_lookup,
index b91fea03b1c3e9d0cd50c9eee699c543b0ff6095..6b1f6d27099a8f3a1a962928c543039d662b401e 100644 (file)
@@ -297,7 +297,7 @@ const struct file_operations ncp_file_operations =
        .fsync          = ncp_fsync,
 };
 
-struct inode_operations ncp_file_inode_operations =
+const struct inode_operations ncp_file_inode_operations =
 {
        .setattr        = ncp_notify_change,
 };
index 67a90bf795d57ef439b5fc1b3f46e09cfc6b78f1..730433f3d2376650b8ade641a12f2f99a192b01d 100644 (file)
@@ -229,7 +229,7 @@ static void ncp_set_attr(struct inode *inode, struct ncp_entry_info *nwinfo)
 }
 
 #if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS)
-static struct inode_operations ncp_symlink_inode_operations = {
+static const struct inode_operations ncp_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = page_follow_link_light,
        .put_link       = page_put_link,
index d9ba8cb0ee75b22b8618f1fe9f75dd13b2cb9259..f03a770bacb06da6d5404e927e8f714f9d0ba6bf 100644 (file)
@@ -65,7 +65,7 @@ const struct file_operations nfs_dir_operations = {
        .fsync          = nfs_fsync_dir,
 };
 
-struct inode_operations nfs_dir_inode_operations = {
+const struct inode_operations nfs_dir_inode_operations = {
        .create         = nfs_create,
        .lookup         = nfs_lookup,
        .link           = nfs_link,
@@ -81,7 +81,7 @@ struct inode_operations nfs_dir_inode_operations = {
 };
 
 #ifdef CONFIG_NFS_V3
-struct inode_operations nfs3_dir_inode_operations = {
+const struct inode_operations nfs3_dir_inode_operations = {
        .create         = nfs_create,
        .lookup         = nfs_lookup,
        .link           = nfs_link,
@@ -104,7 +104,7 @@ struct inode_operations nfs3_dir_inode_operations = {
 #ifdef CONFIG_NFS_V4
 
 static struct dentry *nfs_atomic_lookup(struct inode *, struct dentry *, struct nameidata *);
-struct inode_operations nfs4_dir_inode_operations = {
+const struct inode_operations nfs4_dir_inode_operations = {
        .create         = nfs_create,
        .lookup         = nfs_atomic_lookup,
        .link           = nfs_link,
index 9e4a2b70995a2fc1694b5d34cbb23d88d98c1e15..8e66b5a2d490129bb918a10ecf5e811a7488783e 100644 (file)
@@ -68,14 +68,14 @@ const struct file_operations nfs_file_operations = {
        .check_flags    = nfs_check_flags,
 };
 
-struct inode_operations nfs_file_inode_operations = {
+const struct inode_operations nfs_file_inode_operations = {
        .permission     = nfs_permission,
        .getattr        = nfs_getattr,
        .setattr        = nfs_setattr,
 };
 
 #ifdef CONFIG_NFS_V3
-struct inode_operations nfs3_file_inode_operations = {
+const struct inode_operations nfs3_file_inode_operations = {
        .permission     = nfs_permission,
        .getattr        = nfs_getattr,
        .setattr        = nfs_setattr,
index 371b804e7cc8a66e2e6f20c00356799e5b6c51cc..7f86e65182e450b528ab7e0a6811ece68c516b56 100644 (file)
@@ -155,12 +155,12 @@ out_follow:
        goto out;
 }
 
-struct inode_operations nfs_mountpoint_inode_operations = {
+const struct inode_operations nfs_mountpoint_inode_operations = {
        .follow_link    = nfs_follow_mountpoint,
        .getattr        = nfs_getattr,
 };
 
-struct inode_operations nfs_referral_inode_operations = {
+const struct inode_operations nfs_referral_inode_operations = {
        .follow_link    = nfs_follow_mountpoint,
 };
 
index c26cd978c7cce4f3b8576e62bbdd03860c6ce3f0..e2341766c4f04b4cc388086b8f5dd6ea25fa3cc0 100644 (file)
@@ -151,7 +151,7 @@ struct nfs4_state_recovery_ops {
 };
 
 extern struct dentry_operations nfs4_dentry_operations;
-extern struct inode_operations nfs4_dir_inode_operations;
+extern const struct inode_operations nfs4_dir_inode_operations;
 
 /* inode.c */
 extern ssize_t nfs4_getxattr(struct dentry *, const char *, void *, size_t);
index b3fd29baadc391ff61c822bde3e056e8b3b339e3..1daee65b517e86d66f771aba7badb94517cb575e 100644 (file)
@@ -3625,7 +3625,7 @@ struct nfs4_state_recovery_ops nfs4_network_partition_recovery_ops = {
        .recover_lock   = nfs4_lock_expired,
 };
 
-static struct inode_operations nfs4_file_inode_operations = {
+static const struct inode_operations nfs4_file_inode_operations = {
        .permission     = nfs_permission,
        .getattr        = nfs_getattr,
        .setattr        = nfs_setattr,
index 525c136c7d8ce34ff341151cd9c7230bff8cc5b1..f4a0548b9ce858a5921192a19cba0dfba5dac191 100644 (file)
@@ -78,7 +78,7 @@ read_failed:
 /*
  * symlinks can't do much...
  */
-struct inode_operations nfs_symlink_inode_operations = {
+const struct inode_operations nfs_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = nfs_follow_link,
        .put_link       = page_put_link,
index 076c9420c257dc6d0e8842135d7a87f6dcc74a61..d69c4595ccd0755611c2a0409d00e001a6e2b389 100644 (file)
@@ -2328,7 +2328,7 @@ const struct file_operations ntfs_file_ops = {
                                                    the data source. */
 };
 
-struct inode_operations ntfs_file_inode_ops = {
+const struct inode_operations ntfs_file_inode_ops = {
 #ifdef NTFS_RW
        .truncate       = ntfs_truncate_vfs,
        .setattr        = ntfs_setattr,
@@ -2337,4 +2337,4 @@ struct inode_operations ntfs_file_inode_ops = {
 
 const struct file_operations ntfs_empty_file_ops = {};
 
-struct inode_operations ntfs_empty_inode_ops = {};
+const struct inode_operations ntfs_empty_inode_ops = {};
index eddb2247cec5897319eb719805e19e62295c008b..bff01a54675ae1e04cbaa3d39648239cec11055b 100644 (file)
@@ -359,7 +359,7 @@ err_out:
 /**
  * Inode operations for directories.
  */
-struct inode_operations ntfs_dir_inode_ops = {
+const struct inode_operations ntfs_dir_inode_ops = {
        .lookup = ntfs_lookup,  /* VFS: Lookup directory. */
 };
 
index a12847ae467d3a595dc020d646b7912b5f2cbc4e..d73f5a9ac341b62d658ecf81dd8d3eebf142c685 100644 (file)
@@ -61,13 +61,13 @@ extern const struct address_space_operations ntfs_aops;
 extern const struct address_space_operations ntfs_mst_aops;
 
 extern const struct  file_operations ntfs_file_ops;
-extern struct inode_operations ntfs_file_inode_ops;
+extern const struct inode_operations ntfs_file_inode_ops;
 
 extern const struct  file_operations ntfs_dir_ops;
-extern struct inode_operations ntfs_dir_inode_ops;
+extern const struct inode_operations ntfs_dir_inode_ops;
 
 extern const struct  file_operations ntfs_empty_file_ops;
-extern struct inode_operations ntfs_empty_inode_ops;
+extern const struct inode_operations ntfs_empty_inode_ops;
 
 extern struct export_operations ntfs_export_ops;
 
index 30826242bf51463027724acd9550bff8301cc4e1..84b33ffb42f1f3a18010a97212a336e6ab84acaa 100644 (file)
@@ -63,9 +63,9 @@
 
 static struct super_operations dlmfs_ops;
 static const struct file_operations dlmfs_file_operations;
-static struct inode_operations dlmfs_dir_inode_operations;
-static struct inode_operations dlmfs_root_inode_operations;
-static struct inode_operations dlmfs_file_inode_operations;
+static const struct inode_operations dlmfs_dir_inode_operations;
+static const struct inode_operations dlmfs_root_inode_operations;
+static const struct inode_operations dlmfs_file_inode_operations;
 static struct kmem_cache *dlmfs_inode_cache;
 
 struct workqueue_struct *user_dlm_worker;
@@ -547,14 +547,14 @@ static const struct file_operations dlmfs_file_operations = {
        .write          = dlmfs_file_write,
 };
 
-static struct inode_operations dlmfs_dir_inode_operations = {
+static const struct inode_operations dlmfs_dir_inode_operations = {
        .create         = dlmfs_create,
        .lookup         = simple_lookup,
        .unlink         = dlmfs_unlink,
 };
 
 /* this way we can restrict mkdir to only the toplevel of the fs. */
-static struct inode_operations dlmfs_root_inode_operations = {
+static const struct inode_operations dlmfs_root_inode_operations = {
        .lookup         = simple_lookup,
        .mkdir          = dlmfs_mkdir,
        .rmdir          = simple_rmdir,
@@ -568,7 +568,7 @@ static struct super_operations dlmfs_ops = {
        .drop_inode     = generic_delete_inode,
 };
 
-static struct inode_operations dlmfs_file_inode_operations = {
+static const struct inode_operations dlmfs_file_inode_operations = {
        .getattr        = simple_getattr,
 };
 
index 10953a508f2f3dfdd158102b25d367250834d5ff..f2cd3bf9efb2f6b2dff8b44c44592355e2b44a6e 100644 (file)
@@ -1365,13 +1365,13 @@ bail:
        return ret;
 }
 
-struct inode_operations ocfs2_file_iops = {
+const struct inode_operations ocfs2_file_iops = {
        .setattr        = ocfs2_setattr,
        .getattr        = ocfs2_getattr,
        .permission     = ocfs2_permission,
 };
 
-struct inode_operations ocfs2_special_file_iops = {
+const struct inode_operations ocfs2_special_file_iops = {
        .setattr        = ocfs2_setattr,
        .getattr        = ocfs2_getattr,
        .permission     = ocfs2_permission,
index 601a453f18a85d3e4ba0bb7d1d9848c0f7f9f3fa..cc973f01f6cee2264ffc0b3cad78c7ce52bbd1be 100644 (file)
@@ -28,8 +28,8 @@
 
 extern const struct file_operations ocfs2_fops;
 extern const struct file_operations ocfs2_dops;
-extern struct inode_operations ocfs2_file_iops;
-extern struct inode_operations ocfs2_special_file_iops;
+extern const struct inode_operations ocfs2_file_iops;
+extern const struct inode_operations ocfs2_special_file_iops;
 struct ocfs2_alloc_context;
 
 enum ocfs2_alloc_restarted {
index f3d7803b4b46f18622cbb6156a25f80fa6b89a82..f7fa52bb3f6b66c2a94d5a1188946f028c1b8a97 100644 (file)
@@ -2306,7 +2306,7 @@ leave:
        return status;
 }
 
-struct inode_operations ocfs2_dir_iops = {
+const struct inode_operations ocfs2_dir_iops = {
        .create         = ocfs2_create,
        .lookup         = ocfs2_lookup,
        .link           = ocfs2_link,
index 8425944fcccdf360eeef212b7ca056686b62f564..0975c7b7212bfdecfc9570c66c8865d6ce34060d 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef OCFS2_NAMEI_H
 #define OCFS2_NAMEI_H
 
-extern struct inode_operations ocfs2_dir_iops;
+extern const struct inode_operations ocfs2_dir_iops;
 
 struct dentry *ocfs2_get_parent(struct dentry *child);
 
index 03b0191534d56b1a7ce4e51bb1c9a16c0d83042b..40dc1a51f4a97a5bfba7d3da17707956a8e95390 100644 (file)
@@ -170,12 +170,12 @@ bail:
        return ERR_PTR(status);
 }
 
-struct inode_operations ocfs2_symlink_inode_operations = {
+const struct inode_operations ocfs2_symlink_inode_operations = {
        .readlink       = page_readlink,
        .follow_link    = ocfs2_follow_link,
        .getattr        = ocfs2_getattr,
 };
-struct inode_operations ocfs2_fast_symlink_inode_operations = {
+const struct inode_operations ocfs2_fast_symlink_inode_operations = {
        .readlink       = ocfs2_readlink,
        .follow_link    = ocfs2_follow_link,
        .getattr        = ocfs2_getattr,
index 1ea9e4d9e9eb09b805331b4f00320983502a6fa3..65a6c9c6ad51d1018147cff4685743dd22bae935 100644 (file)
@@ -26,8 +26,8 @@
 #ifndef OCFS2_SYMLINK_H
 #define OCFS2_SYMLINK_H
 
-extern struct inode_operations ocfs2_symlink_inode_operations;
-extern struct inode_operations ocfs2_fast_symlink_inode_operations;
+extern const struct inode_operations ocfs2_symlink_inode_operations;
+extern const struct inode_operations ocfs2_fast_symlink_inode_operations;
 
 /*
  * Test whether an inode is a fast symlink.
index 99c0bc37ba09b91dd2cf99e819261e621634342f..327807b86fa1ba22cd431101bc6a492e6a48b62f 100644 (file)
@@ -169,7 +169,7 @@ static const struct file_operations openprom_operations = {
 
 static struct dentry *openpromfs_lookup(struct inode *, struct dentry *, struct nameidata *);
 
-static struct inode_operations openprom_inode_operations = {
+static const struct inode_operations openprom_inode_operations = {
        .lookup         = openpromfs_lookup,
 };
 
index fafdef357e92c07a2b59c871af8fb8d4df9cf1cf..7a8ce610fda27b5cd31e6b67abb572ae6a9ef5c5 100644 (file)
@@ -84,7 +84,7 @@ struct mqueue_inode_info {
        unsigned long qsize; /* size of queue in memory (sum of all msgs) */
 };
 
-static struct inode_operations mqueue_dir_inode_operations;
+static const struct inode_operations mqueue_dir_inode_operations;
 static const struct file_operations mqueue_file_operations;
 static struct super_operations mqueue_super_ops;
 static void remove_notification(struct mqueue_inode_info *info);
@@ -1160,7 +1160,7 @@ out:
        return ret;
 }
 
-static struct inode_operations mqueue_dir_inode_operations = {
+static const struct inode_operations mqueue_dir_inode_operations = {
        .lookup = simple_lookup,
        .create = mqueue_create,
        .unlink = mqueue_unlink,
index 232aed2b10f9a403346cc6e4a425c4ed8613a4d1..f382b0f775e15ca0d91600c796f746f11d159a72 100644 (file)
@@ -1540,7 +1540,7 @@ static const struct file_operations cpuset_file_operations = {
        .release = cpuset_file_release,
 };
 
-static struct inode_operations cpuset_dir_inode_operations = {
+static const struct inode_operations cpuset_dir_inode_operations = {
        .lookup = simple_lookup,
        .mkdir = cpuset_mkdir,
        .rmdir = cpuset_rmdir,
index b38e17169271b3664dd35f7281048eb116ef37b1..882053031aa0590b502551783c8902b50461abf1 100644 (file)
@@ -178,9 +178,9 @@ static inline void shmem_unacct_blocks(unsigned long flags, long pages)
 static struct super_operations shmem_ops;
 static const struct address_space_operations shmem_aops;
 static const struct file_operations shmem_file_operations;
-static struct inode_operations shmem_inode_operations;
-static struct inode_operations shmem_dir_inode_operations;
-static struct inode_operations shmem_special_inode_operations;
+static const struct inode_operations shmem_inode_operations;
+static const struct inode_operations shmem_dir_inode_operations;
+static const struct inode_operations shmem_special_inode_operations;
 static struct vm_operations_struct shmem_vm_ops;
 
 static struct backing_dev_info shmem_backing_dev_info  __read_mostly = {
@@ -1410,8 +1410,8 @@ shmem_get_inode(struct super_block *sb, int mode, dev_t dev)
 }
 
 #ifdef CONFIG_TMPFS
-static struct inode_operations shmem_symlink_inode_operations;
-static struct inode_operations shmem_symlink_inline_operations;
+static const struct inode_operations shmem_symlink_inode_operations;
+static const struct inode_operations shmem_symlink_inline_operations;
 
 /*
  * Normally tmpfs makes no use of shmem_prepare_write, but it
@@ -1904,12 +1904,12 @@ static void shmem_put_link(struct dentry *dentry, struct nameidata *nd, void *co
        }
 }
 
-static struct inode_operations shmem_symlink_inline_operations = {
+static const struct inode_operations shmem_symlink_inline_operations = {
        .readlink       = generic_readlink,
        .follow_link    = shmem_follow_link_inline,
 };
 
-static struct inode_operations shmem_symlink_inode_operations = {
+static const struct inode_operations shmem_symlink_inode_operations = {
        .truncate       = shmem_truncate,
        .readlink       = generic_readlink,
        .follow_link    = shmem_follow_link,
@@ -2335,7 +2335,7 @@ static const struct file_operations shmem_file_operations = {
 #endif
 };
 
-static struct inode_operations shmem_inode_operations = {
+static const struct inode_operations shmem_inode_operations = {
        .truncate       = shmem_truncate,
        .setattr        = shmem_notify_change,
        .truncate_range = shmem_truncate_range,
@@ -2349,7 +2349,7 @@ static struct inode_operations shmem_inode_operations = {
 
 };
 
-static struct inode_operations shmem_dir_inode_operations = {
+static const struct inode_operations shmem_dir_inode_operations = {
 #ifdef CONFIG_TMPFS
        .create         = shmem_create,
        .lookup         = simple_lookup,
@@ -2371,7 +2371,7 @@ static struct inode_operations shmem_dir_inode_operations = {
 #endif
 };
 
-static struct inode_operations shmem_special_inode_operations = {
+static const struct inode_operations shmem_special_inode_operations = {
 #ifdef CONFIG_TMPFS_POSIX_ACL
        .setattr        = shmem_notify_change,
        .setxattr       = generic_setxattr,