Commit e8b81566 authored by Artem Bityutskiy's avatar Artem Bityutskiy

UBIFS: constify operations

Mark super, file, and inode operation structcutes with 'const'.
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent dedb0d48
...@@ -1199,7 +1199,7 @@ int ubifs_getattr(struct vfsmount *mnt, struct dentry *dentry, ...@@ -1199,7 +1199,7 @@ int ubifs_getattr(struct vfsmount *mnt, struct dentry *dentry,
return 0; return 0;
} }
struct inode_operations ubifs_dir_inode_operations = { const struct inode_operations ubifs_dir_inode_operations = {
.lookup = ubifs_lookup, .lookup = ubifs_lookup,
.create = ubifs_create, .create = ubifs_create,
.link = ubifs_link, .link = ubifs_link,
...@@ -1219,7 +1219,7 @@ struct inode_operations ubifs_dir_inode_operations = { ...@@ -1219,7 +1219,7 @@ struct inode_operations ubifs_dir_inode_operations = {
#endif #endif
}; };
struct file_operations ubifs_dir_operations = { const struct file_operations ubifs_dir_operations = {
.llseek = ubifs_dir_llseek, .llseek = ubifs_dir_llseek,
.release = ubifs_dir_release, .release = ubifs_dir_release,
.read = generic_read_dir, .read = generic_read_dir,
......
...@@ -1541,7 +1541,7 @@ static int ubifs_file_mmap(struct file *file, struct vm_area_struct *vma) ...@@ -1541,7 +1541,7 @@ static int ubifs_file_mmap(struct file *file, struct vm_area_struct *vma)
return 0; return 0;
} }
struct address_space_operations ubifs_file_address_operations = { const struct address_space_operations ubifs_file_address_operations = {
.readpage = ubifs_readpage, .readpage = ubifs_readpage,
.writepage = ubifs_writepage, .writepage = ubifs_writepage,
.write_begin = ubifs_write_begin, .write_begin = ubifs_write_begin,
...@@ -1551,7 +1551,7 @@ struct address_space_operations ubifs_file_address_operations = { ...@@ -1551,7 +1551,7 @@ struct address_space_operations ubifs_file_address_operations = {
.releasepage = ubifs_releasepage, .releasepage = ubifs_releasepage,
}; };
struct inode_operations ubifs_file_inode_operations = { const struct inode_operations ubifs_file_inode_operations = {
.setattr = ubifs_setattr, .setattr = ubifs_setattr,
.getattr = ubifs_getattr, .getattr = ubifs_getattr,
#ifdef CONFIG_UBIFS_FS_XATTR #ifdef CONFIG_UBIFS_FS_XATTR
...@@ -1562,14 +1562,14 @@ struct inode_operations ubifs_file_inode_operations = { ...@@ -1562,14 +1562,14 @@ struct inode_operations ubifs_file_inode_operations = {
#endif #endif
}; };
struct inode_operations ubifs_symlink_inode_operations = { const struct inode_operations ubifs_symlink_inode_operations = {
.readlink = generic_readlink, .readlink = generic_readlink,
.follow_link = ubifs_follow_link, .follow_link = ubifs_follow_link,
.setattr = ubifs_setattr, .setattr = ubifs_setattr,
.getattr = ubifs_getattr, .getattr = ubifs_getattr,
}; };
struct file_operations ubifs_file_operations = { const struct file_operations ubifs_file_operations = {
.llseek = generic_file_llseek, .llseek = generic_file_llseek,
.read = do_sync_read, .read = do_sync_read,
.write = do_sync_write, .write = do_sync_write,
......
...@@ -1778,7 +1778,7 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data) ...@@ -1778,7 +1778,7 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)
return 0; return 0;
} }
struct super_operations ubifs_super_operations = { const struct super_operations ubifs_super_operations = {
.alloc_inode = ubifs_alloc_inode, .alloc_inode = ubifs_alloc_inode,
.destroy_inode = ubifs_destroy_inode, .destroy_inode = ubifs_destroy_inode,
.put_super = ubifs_put_super, .put_super = ubifs_put_super,
......
...@@ -1405,13 +1405,13 @@ extern struct list_head ubifs_infos; ...@@ -1405,13 +1405,13 @@ extern struct list_head ubifs_infos;
extern spinlock_t ubifs_infos_lock; extern spinlock_t ubifs_infos_lock;
extern atomic_long_t ubifs_clean_zn_cnt; extern atomic_long_t ubifs_clean_zn_cnt;
extern struct kmem_cache *ubifs_inode_slab; extern struct kmem_cache *ubifs_inode_slab;
extern struct super_operations ubifs_super_operations; extern const struct super_operations ubifs_super_operations;
extern struct address_space_operations ubifs_file_address_operations; extern const struct address_space_operations ubifs_file_address_operations;
extern struct file_operations ubifs_file_operations; extern const struct file_operations ubifs_file_operations;
extern struct inode_operations ubifs_file_inode_operations; extern const struct inode_operations ubifs_file_inode_operations;
extern struct file_operations ubifs_dir_operations; extern const struct file_operations ubifs_dir_operations;
extern struct inode_operations ubifs_dir_inode_operations; extern const struct inode_operations ubifs_dir_inode_operations;
extern struct inode_operations ubifs_symlink_inode_operations; extern const struct inode_operations ubifs_symlink_inode_operations;
extern struct backing_dev_info ubifs_backing_dev_info; extern struct backing_dev_info ubifs_backing_dev_info;
extern struct ubifs_compressor *ubifs_compressors[UBIFS_COMPR_TYPES_CNT]; extern struct ubifs_compressor *ubifs_compressors[UBIFS_COMPR_TYPES_CNT];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment