aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 3a6f953337b5..f4001112df78 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -55,13 +55,13 @@ struct btrfs_iget_args {
55 struct btrfs_root *root; 55 struct btrfs_root *root;
56}; 56};
57 57
58static struct inode_operations btrfs_dir_inode_operations; 58static const struct inode_operations btrfs_dir_inode_operations;
59static struct inode_operations btrfs_symlink_inode_operations; 59static const struct inode_operations btrfs_symlink_inode_operations;
60static struct inode_operations btrfs_dir_ro_inode_operations; 60static const struct inode_operations btrfs_dir_ro_inode_operations;
61static struct inode_operations btrfs_special_inode_operations; 61static const struct inode_operations btrfs_special_inode_operations;
62static struct inode_operations btrfs_file_inode_operations; 62static const struct inode_operations btrfs_file_inode_operations;
63static struct address_space_operations btrfs_aops; 63static const struct address_space_operations btrfs_aops;
64static struct address_space_operations btrfs_symlink_aops; 64static const struct address_space_operations btrfs_symlink_aops;
65static struct file_operations btrfs_dir_file_operations; 65static struct file_operations btrfs_dir_file_operations;
66static struct extent_io_ops btrfs_extent_io_ops; 66static struct extent_io_ops btrfs_extent_io_ops;
67 67
@@ -5692,7 +5692,7 @@ static int btrfs_permission(struct inode *inode, int mask)
5692 return generic_permission(inode, mask, btrfs_check_acl); 5692 return generic_permission(inode, mask, btrfs_check_acl);
5693} 5693}
5694 5694
5695static struct inode_operations btrfs_dir_inode_operations = { 5695static const struct inode_operations btrfs_dir_inode_operations = {
5696 .getattr = btrfs_getattr, 5696 .getattr = btrfs_getattr,
5697 .lookup = btrfs_lookup, 5697 .lookup = btrfs_lookup,
5698 .create = btrfs_create, 5698 .create = btrfs_create,
@@ -5710,7 +5710,7 @@ static struct inode_operations btrfs_dir_inode_operations = {
5710 .removexattr = btrfs_removexattr, 5710 .removexattr = btrfs_removexattr,
5711 .permission = btrfs_permission, 5711 .permission = btrfs_permission,
5712}; 5712};
5713static struct inode_operations btrfs_dir_ro_inode_operations = { 5713static const struct inode_operations btrfs_dir_ro_inode_operations = {
5714 .lookup = btrfs_lookup, 5714 .lookup = btrfs_lookup,
5715 .permission = btrfs_permission, 5715 .permission = btrfs_permission,
5716}; 5716};
@@ -5753,7 +5753,7 @@ static struct extent_io_ops btrfs_extent_io_ops = {
5753 * 5753 *
5754 * For now we're avoiding this by dropping bmap. 5754 * For now we're avoiding this by dropping bmap.
5755 */ 5755 */
5756static struct address_space_operations btrfs_aops = { 5756static const struct address_space_operations btrfs_aops = {
5757 .readpage = btrfs_readpage, 5757 .readpage = btrfs_readpage,
5758 .writepage = btrfs_writepage, 5758 .writepage = btrfs_writepage,
5759 .writepages = btrfs_writepages, 5759 .writepages = btrfs_writepages,
@@ -5763,16 +5763,17 @@ static struct address_space_operations btrfs_aops = {
5763 .invalidatepage = btrfs_invalidatepage, 5763 .invalidatepage = btrfs_invalidatepage,
5764 .releasepage = btrfs_releasepage, 5764 .releasepage = btrfs_releasepage,
5765 .set_page_dirty = btrfs_set_page_dirty, 5765 .set_page_dirty = btrfs_set_page_dirty,
5766 .error_remove_page = generic_error_remove_page,
5766}; 5767};
5767 5768
5768static struct address_space_operations btrfs_symlink_aops = { 5769static const struct address_space_operations btrfs_symlink_aops = {
5769 .readpage = btrfs_readpage, 5770 .readpage = btrfs_readpage,
5770 .writepage = btrfs_writepage, 5771 .writepage = btrfs_writepage,
5771 .invalidatepage = btrfs_invalidatepage, 5772 .invalidatepage = btrfs_invalidatepage,
5772 .releasepage = btrfs_releasepage, 5773 .releasepage = btrfs_releasepage,
5773}; 5774};
5774 5775
5775static struct inode_operations btrfs_file_inode_operations = { 5776static const struct inode_operations btrfs_file_inode_operations = {
5776 .truncate = btrfs_truncate, 5777 .truncate = btrfs_truncate,
5777 .getattr = btrfs_getattr, 5778 .getattr = btrfs_getattr,
5778 .setattr = btrfs_setattr, 5779 .setattr = btrfs_setattr,
@@ -5784,7 +5785,7 @@ static struct inode_operations btrfs_file_inode_operations = {
5784 .fallocate = btrfs_fallocate, 5785 .fallocate = btrfs_fallocate,
5785 .fiemap = btrfs_fiemap, 5786 .fiemap = btrfs_fiemap,
5786}; 5787};
5787static struct inode_operations btrfs_special_inode_operations = { 5788static const struct inode_operations btrfs_special_inode_operations = {
5788 .getattr = btrfs_getattr, 5789 .getattr = btrfs_getattr,
5789 .setattr = btrfs_setattr, 5790 .setattr = btrfs_setattr,
5790 .permission = btrfs_permission, 5791 .permission = btrfs_permission,
@@ -5793,7 +5794,7 @@ static struct inode_operations btrfs_special_inode_operations = {
5793 .listxattr = btrfs_listxattr, 5794 .listxattr = btrfs_listxattr,
5794 .removexattr = btrfs_removexattr, 5795 .removexattr = btrfs_removexattr,
5795}; 5796};
5796static struct inode_operations btrfs_symlink_inode_operations = { 5797static const struct inode_operations btrfs_symlink_inode_operations = {
5797 .readlink = generic_readlink, 5798 .readlink = generic_readlink,
5798 .follow_link = page_follow_link_light, 5799 .follow_link = page_follow_link_light,
5799 .put_link = page_put_link, 5800 .put_link = page_put_link,