const: mark remaining inode_operations as const
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 22 Sep 2009 00:01:11 +0000 (17:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Sep 2009 14:17:24 +0000 (07:17 -0700)
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>
14 files changed:
arch/powerpc/platforms/cell/spufs/inode.c
fs/btrfs/inode.c
fs/cifs/cifs_dfs_ref.c
fs/cifs/cifsfs.h
fs/inode.c
fs/nilfs2/file.c
fs/nilfs2/mdt.c
fs/nilfs2/namei.c
fs/nilfs2/nilfs.h
fs/omfs/dir.c
fs/omfs/file.c
fs/omfs/omfs.h
fs/romfs/super.c
kernel/cgroup.c

index 78f2a52f7288af213cf7f3e67ed9c53e8827e1d1..fc1b1c42b1dce10ff94a8491b788d7a51862350d 100644 (file)
@@ -119,7 +119,7 @@ spufs_new_file(struct super_block *sb, struct dentry *dentry,
                const struct file_operations *fops, int mode,
                size_t size, struct spu_context *ctx)
 {
-       static struct inode_operations spufs_file_iops = {
+       static const struct inode_operations spufs_file_iops = {
                .setattr = spufs_setattr,
        };
        struct inode *inode;
index 3e4d679578869495eaebe48b4e6314ce74cfff2b..9096fd0ca3ca447a7195f489f03d862340173494 100644 (file)
@@ -55,11 +55,11 @@ struct btrfs_iget_args {
        struct btrfs_root *root;
 };
 
-static struct inode_operations btrfs_dir_inode_operations;
-static struct inode_operations btrfs_symlink_inode_operations;
-static struct inode_operations btrfs_dir_ro_inode_operations;
-static struct inode_operations btrfs_special_inode_operations;
-static struct inode_operations btrfs_file_inode_operations;
+static const struct inode_operations btrfs_dir_inode_operations;
+static const struct inode_operations btrfs_symlink_inode_operations;
+static const struct inode_operations btrfs_dir_ro_inode_operations;
+static const struct inode_operations btrfs_special_inode_operations;
+static const struct inode_operations btrfs_file_inode_operations;
 static const struct address_space_operations btrfs_aops;
 static const struct address_space_operations btrfs_symlink_aops;
 static struct file_operations btrfs_dir_file_operations;
@@ -5201,7 +5201,7 @@ static int btrfs_permission(struct inode *inode, int mask)
        return generic_permission(inode, mask, btrfs_check_acl);
 }
 
-static struct inode_operations btrfs_dir_inode_operations = {
+static const struct inode_operations btrfs_dir_inode_operations = {
        .getattr        = btrfs_getattr,
        .lookup         = btrfs_lookup,
        .create         = btrfs_create,
@@ -5219,7 +5219,7 @@ static struct inode_operations btrfs_dir_inode_operations = {
        .removexattr    = btrfs_removexattr,
        .permission     = btrfs_permission,
 };
-static struct inode_operations btrfs_dir_ro_inode_operations = {
+static const struct inode_operations btrfs_dir_ro_inode_operations = {
        .lookup         = btrfs_lookup,
        .permission     = btrfs_permission,
 };
@@ -5278,7 +5278,7 @@ static const struct address_space_operations btrfs_symlink_aops = {
        .releasepage    = btrfs_releasepage,
 };
 
-static struct inode_operations btrfs_file_inode_operations = {
+static const struct inode_operations btrfs_file_inode_operations = {
        .truncate       = btrfs_truncate,
        .getattr        = btrfs_getattr,
        .setattr        = btrfs_setattr,
@@ -5290,7 +5290,7 @@ static struct inode_operations btrfs_file_inode_operations = {
        .fallocate      = btrfs_fallocate,
        .fiemap         = btrfs_fiemap,
 };
-static struct inode_operations btrfs_special_inode_operations = {
+static const struct inode_operations btrfs_special_inode_operations = {
        .getattr        = btrfs_getattr,
        .setattr        = btrfs_setattr,
        .permission     = btrfs_permission,
@@ -5299,7 +5299,7 @@ static struct inode_operations btrfs_special_inode_operations = {
        .listxattr      = btrfs_listxattr,
        .removexattr    = btrfs_removexattr,
 };
-static struct inode_operations btrfs_symlink_inode_operations = {
+static const struct inode_operations btrfs_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = page_follow_link_light,
        .put_link       = page_put_link,
index 606912d8f2a885d9272a843e34542adc1cc9c3d0..6889c0d07b823c1d67628f0377533ff55bc90a72 100644 (file)
@@ -385,7 +385,7 @@ out_err:
        goto out;
 }
 
-struct inode_operations cifs_dfs_referral_inode_operations = {
+const struct inode_operations cifs_dfs_referral_inode_operations = {
        .follow_link = cifs_dfs_follow_mountpoint,
 };
 
index 094325e3f7147cd26c78da12fd842a3f223843d8..ac2b24c192f881d229ccf5fb64e99dfe07b2a76a 100644 (file)
@@ -67,7 +67,7 @@ extern int cifs_setattr(struct dentry *, struct iattr *);
 
 extern const struct inode_operations cifs_file_inode_ops;
 extern const struct inode_operations cifs_symlink_inode_ops;
-extern struct inode_operations cifs_dfs_referral_inode_operations;
+extern const struct inode_operations cifs_dfs_referral_inode_operations;
 
 
 /* Functions related to files and directories */
index 798052f87035e65ee21de37a916db35dd3b4a2e0..f5ff71cb3e2b3bcd1ba92512022c41f2f9571208 100644 (file)
@@ -123,7 +123,7 @@ static void wake_up_inode(struct inode *inode)
 int inode_init_always(struct super_block *sb, struct inode *inode)
 {
        static const struct address_space_operations empty_aops;
-       static struct inode_operations empty_iops;
+       static const struct inode_operations empty_iops;
        static const struct file_operations empty_fops;
        struct address_space *const mapping = &inode->i_data;
 
index 6bd84a0d82385cf26e6bc8194dfe5340d73d149a..fc8278c77cdda4028565931f1c678fb0cd1121b2 100644 (file)
@@ -151,7 +151,7 @@ struct file_operations nilfs_file_operations = {
        .splice_read    = generic_file_splice_read,
 };
 
-struct inode_operations nilfs_file_inode_operations = {
+const struct inode_operations nilfs_file_inode_operations = {
        .truncate       = nilfs_truncate,
        .setattr        = nilfs_setattr,
        .permission     = nilfs_permission,
index 680e86c8d4352c148745bcde75b749c9f04af4f8..b18c4998f8d0c1834727ecf089d48d3235851766 100644 (file)
@@ -432,7 +432,7 @@ static const struct address_space_operations def_mdt_aops = {
        .sync_page              = block_sync_page,
 };
 
-static struct inode_operations def_mdt_iops;
+static const struct inode_operations def_mdt_iops;
 static struct file_operations def_mdt_fops;
 
 /*
index df70dadb336f1349dd2661184695c70d8673415b..ed02e886fa79ba8ad64d8f5180a3d1cc67e31541 100644 (file)
@@ -448,7 +448,7 @@ out:
        return err;
 }
 
-struct inode_operations nilfs_dir_inode_operations = {
+const struct inode_operations nilfs_dir_inode_operations = {
        .create         = nilfs_create,
        .lookup         = nilfs_lookup,
        .link           = nilfs_link,
@@ -462,12 +462,12 @@ struct inode_operations nilfs_dir_inode_operations = {
        .permission     = nilfs_permission,
 };
 
-struct inode_operations nilfs_special_inode_operations = {
+const struct inode_operations nilfs_special_inode_operations = {
        .setattr        = nilfs_setattr,
        .permission     = nilfs_permission,
 };
 
-struct inode_operations nilfs_symlink_inode_operations = {
+const struct inode_operations nilfs_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .follow_link    = page_follow_link_light,
        .put_link       = page_put_link,
index c0cf52a865623306fd5d9756fea2582bcb0b1c71..bad7368782d08a7759ca5964c9dda18b130f4819 100644 (file)
@@ -295,12 +295,12 @@ void nilfs_clear_gcdat_inode(struct the_nilfs *);
  * Inodes and files operations
  */
 extern struct file_operations nilfs_dir_operations;
-extern struct inode_operations nilfs_file_inode_operations;
+extern const struct inode_operations nilfs_file_inode_operations;
 extern struct file_operations nilfs_file_operations;
 extern const struct address_space_operations nilfs_aops;
-extern struct inode_operations nilfs_dir_inode_operations;
-extern struct inode_operations nilfs_special_inode_operations;
-extern struct inode_operations nilfs_symlink_inode_operations;
+extern const struct inode_operations nilfs_dir_inode_operations;
+extern const struct inode_operations nilfs_special_inode_operations;
+extern const struct inode_operations nilfs_symlink_inode_operations;
 
 /*
  * filesystem type
index c7275cfbdcfb92d4ca1a17a0444546c52d7b38c1..3680bae335b5b37464dbf6ba126855be69e8d021 100644 (file)
@@ -489,7 +489,7 @@ out:
        return ret;
 }
 
-struct inode_operations omfs_dir_inops = {
+const struct inode_operations omfs_dir_inops = {
        .lookup = omfs_lookup,
        .mkdir = omfs_mkdir,
        .rename = omfs_rename,
index b707fa5396b7e9ea88eea9be659278fc376a30c0..4845fbb18e6e96c579384e3dfa53271a0b577343 100644 (file)
@@ -333,7 +333,7 @@ struct file_operations omfs_file_operations = {
        .splice_read = generic_file_splice_read,
 };
 
-struct inode_operations omfs_file_inops = {
+const struct inode_operations omfs_file_inops = {
        .truncate = omfs_truncate
 };
 
index 16d72ab13d3ed4057fba327a9f436147f443a88e..df71039945ac2f15124bdba6e2a7c3c16ac485dc 100644 (file)
@@ -45,14 +45,14 @@ extern int omfs_clear_range(struct super_block *sb, u64 block, int count);
 
 /* dir.c */
 extern struct file_operations omfs_dir_operations;
-extern struct inode_operations omfs_dir_inops;
+extern const struct inode_operations omfs_dir_inops;
 extern int omfs_make_empty(struct inode *inode, struct super_block *sb);
 extern int omfs_is_bad(struct omfs_sb_info *sbi, struct omfs_header *header,
                        u64 fsblock);
 
 /* file.c */
 extern struct file_operations omfs_file_operations;
-extern struct inode_operations omfs_file_inops;
+extern const struct inode_operations omfs_file_inops;
 extern const struct address_space_operations omfs_aops;
 extern void omfs_make_empty_table(struct buffer_head *bh, int offset);
 extern int omfs_shrink_inode(struct inode *inode);
index 4ab3c03d8f9563a588a3b1a0e152bc528dd9d601..47f132df0c3f0a630673831c2b862ce96ac72968 100644 (file)
@@ -284,7 +284,7 @@ static const struct file_operations romfs_dir_operations = {
        .readdir        = romfs_readdir,
 };
 
-static struct inode_operations romfs_dir_inode_operations = {
+static const struct inode_operations romfs_dir_inode_operations = {
        .lookup         = romfs_lookup,
 };
 
index 39dde299a92059bf1acc6df7f32e415b46508de2..213b7f92fcdd6159b1af60d150b1d1887a4e7364 100644 (file)
@@ -596,7 +596,7 @@ void cgroup_unlock(void)
 static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, int mode);
 static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry);
 static int cgroup_populate_dir(struct cgroup *cgrp);
-static struct inode_operations cgroup_dir_inode_operations;
+static const struct inode_operations cgroup_dir_inode_operations;
 static struct file_operations proc_cgroupstats_operations;
 
 static struct backing_dev_info cgroup_backing_dev_info = {
@@ -1711,7 +1711,7 @@ static struct file_operations cgroup_file_operations = {
        .release = cgroup_file_release,
 };
 
-static struct inode_operations cgroup_dir_inode_operations = {
+static const struct inode_operations cgroup_dir_inode_operations = {
        .lookup = simple_lookup,
        .mkdir = cgroup_mkdir,
        .rmdir = cgroup_rmdir,