Skip to content

Commit

Permalink
const: mark remaining inode_operations as const
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Dobriyan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alexey Dobriyan authored and torvalds committed Sep 22, 2009
1 parent 7f09410 commit 6e1d5dc
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/cell/spufs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
20 changes: 10 additions & 10 deletions fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand All @@ -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,
};
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion fs/cifs/cifs_dfs_ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
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,
};

2 changes: 1 addition & 1 deletion fs/cifs/cifsfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion fs/nilfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion fs/nilfs2/mdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down
6 changes: 3 additions & 3 deletions fs/nilfs2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry,
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,
Expand All @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions fs/nilfs2/nilfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fs/omfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ static int omfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
return ret;
}

struct inode_operations omfs_dir_inops = {
const struct inode_operations omfs_dir_inops = {
.lookup = omfs_lookup,
.mkdir = omfs_mkdir,
.rename = omfs_rename,
Expand Down
2 changes: 1 addition & 1 deletion fs/omfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
4 changes: 2 additions & 2 deletions fs/omfs/omfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion fs/romfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down
4 changes: 2 additions & 2 deletions kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 6e1d5dc

Please sign in to comment.