diff options
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index ee92801fc5db..b3ad168a0bfc 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -55,14 +55,14 @@ struct btrfs_iget_args { | |||
55 | struct btrfs_root *root; | 55 | struct btrfs_root *root; |
56 | }; | 56 | }; |
57 | 57 | ||
58 | static struct inode_operations btrfs_dir_inode_operations; | 58 | static const struct inode_operations btrfs_dir_inode_operations; |
59 | static struct inode_operations btrfs_symlink_inode_operations; | 59 | static const struct inode_operations btrfs_symlink_inode_operations; |
60 | static struct inode_operations btrfs_dir_ro_inode_operations; | 60 | static const struct inode_operations btrfs_dir_ro_inode_operations; |
61 | static struct inode_operations btrfs_special_inode_operations; | 61 | static const struct inode_operations btrfs_special_inode_operations; |
62 | static struct inode_operations btrfs_file_inode_operations; | 62 | static const struct inode_operations btrfs_file_inode_operations; |
63 | static struct address_space_operations btrfs_aops; | 63 | static const struct address_space_operations btrfs_aops; |
64 | static struct address_space_operations btrfs_symlink_aops; | 64 | static const struct address_space_operations btrfs_symlink_aops; |
65 | static struct file_operations btrfs_dir_file_operations; | 65 | static const struct file_operations btrfs_dir_file_operations; |
66 | static struct extent_io_ops btrfs_extent_io_ops; | 66 | static struct extent_io_ops btrfs_extent_io_ops; |
67 | 67 | ||
68 | static struct kmem_cache *btrfs_inode_cachep; | 68 | static struct kmem_cache *btrfs_inode_cachep; |
@@ -5819,7 +5819,7 @@ static int btrfs_permission(struct inode *inode, int mask) | |||
5819 | return generic_permission(inode, mask, btrfs_check_acl); | 5819 | return generic_permission(inode, mask, btrfs_check_acl); |
5820 | } | 5820 | } |
5821 | 5821 | ||
5822 | static struct inode_operations btrfs_dir_inode_operations = { | 5822 | static const struct inode_operations btrfs_dir_inode_operations = { |
5823 | .getattr = btrfs_getattr, | 5823 | .getattr = btrfs_getattr, |
5824 | .lookup = btrfs_lookup, | 5824 | .lookup = btrfs_lookup, |
5825 | .create = btrfs_create, | 5825 | .create = btrfs_create, |
@@ -5837,12 +5837,12 @@ static struct inode_operations btrfs_dir_inode_operations = { | |||
5837 | .removexattr = btrfs_removexattr, | 5837 | .removexattr = btrfs_removexattr, |
5838 | .permission = btrfs_permission, | 5838 | .permission = btrfs_permission, |
5839 | }; | 5839 | }; |
5840 | static struct inode_operations btrfs_dir_ro_inode_operations = { | 5840 | static const struct inode_operations btrfs_dir_ro_inode_operations = { |
5841 | .lookup = btrfs_lookup, | 5841 | .lookup = btrfs_lookup, |
5842 | .permission = btrfs_permission, | 5842 | .permission = btrfs_permission, |
5843 | }; | 5843 | }; |
5844 | 5844 | ||
5845 | static struct file_operations btrfs_dir_file_operations = { | 5845 | static const struct file_operations btrfs_dir_file_operations = { |
5846 | .llseek = generic_file_llseek, | 5846 | .llseek = generic_file_llseek, |
5847 | .read = generic_read_dir, | 5847 | .read = generic_read_dir, |
5848 | .readdir = btrfs_real_readdir, | 5848 | .readdir = btrfs_real_readdir, |
@@ -5880,7 +5880,7 @@ static struct extent_io_ops btrfs_extent_io_ops = { | |||
5880 | * | 5880 | * |
5881 | * For now we're avoiding this by dropping bmap. | 5881 | * For now we're avoiding this by dropping bmap. |
5882 | */ | 5882 | */ |
5883 | static struct address_space_operations btrfs_aops = { | 5883 | static const struct address_space_operations btrfs_aops = { |
5884 | .readpage = btrfs_readpage, | 5884 | .readpage = btrfs_readpage, |
5885 | .writepage = btrfs_writepage, | 5885 | .writepage = btrfs_writepage, |
5886 | .writepages = btrfs_writepages, | 5886 | .writepages = btrfs_writepages, |
@@ -5890,16 +5890,17 @@ static struct address_space_operations btrfs_aops = { | |||
5890 | .invalidatepage = btrfs_invalidatepage, | 5890 | .invalidatepage = btrfs_invalidatepage, |
5891 | .releasepage = btrfs_releasepage, | 5891 | .releasepage = btrfs_releasepage, |
5892 | .set_page_dirty = btrfs_set_page_dirty, | 5892 | .set_page_dirty = btrfs_set_page_dirty, |
5893 | .error_remove_page = generic_error_remove_page, | ||
5893 | }; | 5894 | }; |
5894 | 5895 | ||
5895 | static struct address_space_operations btrfs_symlink_aops = { | 5896 | static const struct address_space_operations btrfs_symlink_aops = { |
5896 | .readpage = btrfs_readpage, | 5897 | .readpage = btrfs_readpage, |
5897 | .writepage = btrfs_writepage, | 5898 | .writepage = btrfs_writepage, |
5898 | .invalidatepage = btrfs_invalidatepage, | 5899 | .invalidatepage = btrfs_invalidatepage, |
5899 | .releasepage = btrfs_releasepage, | 5900 | .releasepage = btrfs_releasepage, |
5900 | }; | 5901 | }; |
5901 | 5902 | ||
5902 | static struct inode_operations btrfs_file_inode_operations = { | 5903 | static const struct inode_operations btrfs_file_inode_operations = { |
5903 | .truncate = btrfs_truncate, | 5904 | .truncate = btrfs_truncate, |
5904 | .getattr = btrfs_getattr, | 5905 | .getattr = btrfs_getattr, |
5905 | .setattr = btrfs_setattr, | 5906 | .setattr = btrfs_setattr, |
@@ -5911,7 +5912,7 @@ static struct inode_operations btrfs_file_inode_operations = { | |||
5911 | .fallocate = btrfs_fallocate, | 5912 | .fallocate = btrfs_fallocate, |
5912 | .fiemap = btrfs_fiemap, | 5913 | .fiemap = btrfs_fiemap, |
5913 | }; | 5914 | }; |
5914 | static struct inode_operations btrfs_special_inode_operations = { | 5915 | static const struct inode_operations btrfs_special_inode_operations = { |
5915 | .getattr = btrfs_getattr, | 5916 | .getattr = btrfs_getattr, |
5916 | .setattr = btrfs_setattr, | 5917 | .setattr = btrfs_setattr, |
5917 | .permission = btrfs_permission, | 5918 | .permission = btrfs_permission, |
@@ -5920,7 +5921,7 @@ static struct inode_operations btrfs_special_inode_operations = { | |||
5920 | .listxattr = btrfs_listxattr, | 5921 | .listxattr = btrfs_listxattr, |
5921 | .removexattr = btrfs_removexattr, | 5922 | .removexattr = btrfs_removexattr, |
5922 | }; | 5923 | }; |
5923 | static struct inode_operations btrfs_symlink_inode_operations = { | 5924 | static const struct inode_operations btrfs_symlink_inode_operations = { |
5924 | .readlink = generic_readlink, | 5925 | .readlink = generic_readlink, |
5925 | .follow_link = page_follow_link_light, | 5926 | .follow_link = page_follow_link_light, |
5926 | .put_link = page_put_link, | 5927 | .put_link = page_put_link, |