UBIFS: constify operations
Mark super, file, and inode operation structcutes with 'const'. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
parent
dedb0d48a9
commit
e8b815663b
@ -1199,7 +1199,7 @@ int ubifs_getattr(struct vfsmount *mnt, struct dentry *dentry,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct inode_operations ubifs_dir_inode_operations = {
|
||||
const struct inode_operations ubifs_dir_inode_operations = {
|
||||
.lookup = ubifs_lookup,
|
||||
.create = ubifs_create,
|
||||
.link = ubifs_link,
|
||||
@ -1219,7 +1219,7 @@ struct inode_operations ubifs_dir_inode_operations = {
|
||||
#endif
|
||||
};
|
||||
|
||||
struct file_operations ubifs_dir_operations = {
|
||||
const struct file_operations ubifs_dir_operations = {
|
||||
.llseek = ubifs_dir_llseek,
|
||||
.release = ubifs_dir_release,
|
||||
.read = generic_read_dir,
|
||||
|
@ -1541,7 +1541,7 @@ static int ubifs_file_mmap(struct file *file, struct vm_area_struct *vma)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct address_space_operations ubifs_file_address_operations = {
|
||||
const struct address_space_operations ubifs_file_address_operations = {
|
||||
.readpage = ubifs_readpage,
|
||||
.writepage = ubifs_writepage,
|
||||
.write_begin = ubifs_write_begin,
|
||||
@ -1551,7 +1551,7 @@ struct address_space_operations ubifs_file_address_operations = {
|
||||
.releasepage = ubifs_releasepage,
|
||||
};
|
||||
|
||||
struct inode_operations ubifs_file_inode_operations = {
|
||||
const struct inode_operations ubifs_file_inode_operations = {
|
||||
.setattr = ubifs_setattr,
|
||||
.getattr = ubifs_getattr,
|
||||
#ifdef CONFIG_UBIFS_FS_XATTR
|
||||
@ -1562,14 +1562,14 @@ struct inode_operations ubifs_file_inode_operations = {
|
||||
#endif
|
||||
};
|
||||
|
||||
struct inode_operations ubifs_symlink_inode_operations = {
|
||||
const struct inode_operations ubifs_symlink_inode_operations = {
|
||||
.readlink = generic_readlink,
|
||||
.follow_link = ubifs_follow_link,
|
||||
.setattr = ubifs_setattr,
|
||||
.getattr = ubifs_getattr,
|
||||
};
|
||||
|
||||
struct file_operations ubifs_file_operations = {
|
||||
const struct file_operations ubifs_file_operations = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read = do_sync_read,
|
||||
.write = do_sync_write,
|
||||
|
@ -1778,7 +1778,7 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct super_operations ubifs_super_operations = {
|
||||
const struct super_operations ubifs_super_operations = {
|
||||
.alloc_inode = ubifs_alloc_inode,
|
||||
.destroy_inode = ubifs_destroy_inode,
|
||||
.put_super = ubifs_put_super,
|
||||
|
@ -1405,13 +1405,13 @@ extern struct list_head ubifs_infos;
|
||||
extern spinlock_t ubifs_infos_lock;
|
||||
extern atomic_long_t ubifs_clean_zn_cnt;
|
||||
extern struct kmem_cache *ubifs_inode_slab;
|
||||
extern struct super_operations ubifs_super_operations;
|
||||
extern struct address_space_operations ubifs_file_address_operations;
|
||||
extern struct file_operations ubifs_file_operations;
|
||||
extern struct inode_operations ubifs_file_inode_operations;
|
||||
extern struct file_operations ubifs_dir_operations;
|
||||
extern struct inode_operations ubifs_dir_inode_operations;
|
||||
extern struct inode_operations ubifs_symlink_inode_operations;
|
||||
extern const struct super_operations ubifs_super_operations;
|
||||
extern const struct address_space_operations ubifs_file_address_operations;
|
||||
extern const struct file_operations ubifs_file_operations;
|
||||
extern const struct inode_operations ubifs_file_inode_operations;
|
||||
extern const struct file_operations ubifs_dir_operations;
|
||||
extern const struct inode_operations ubifs_dir_inode_operations;
|
||||
extern const struct inode_operations ubifs_symlink_inode_operations;
|
||||
extern struct backing_dev_info ubifs_backing_dev_info;
|
||||
extern struct ubifs_compressor *ubifs_compressors[UBIFS_COMPR_TYPES_CNT];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user