diff options
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 3cc5677f544..5b9c8e0d6dd 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 | ||
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 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 | ||
@@ -5681,7 +5681,7 @@ static int btrfs_permission(struct inode *inode, int mask) | |||
5681 | return generic_permission(inode, mask, btrfs_check_acl); | 5681 | return generic_permission(inode, mask, btrfs_check_acl); |
5682 | } | 5682 | } |
5683 | 5683 | ||
5684 | static struct inode_operations btrfs_dir_inode_operations = { | 5684 | static const struct inode_operations btrfs_dir_inode_operations = { |
5685 | .getattr = btrfs_getattr, | 5685 | .getattr = btrfs_getattr, |
5686 | .lookup = btrfs_lookup, | 5686 | .lookup = btrfs_lookup, |
5687 | .create = btrfs_create, | 5687 | .create = btrfs_create, |
@@ -5699,7 +5699,7 @@ static struct inode_operations btrfs_dir_inode_operations = { | |||
5699 | .removexattr = btrfs_removexattr, | 5699 | .removexattr = btrfs_removexattr, |
5700 | .permission = btrfs_permission, | 5700 | .permission = btrfs_permission, |
5701 | }; | 5701 | }; |
5702 | static struct inode_operations btrfs_dir_ro_inode_operations = { | 5702 | static const struct inode_operations btrfs_dir_ro_inode_operations = { |
5703 | .lookup = btrfs_lookup, | 5703 | .lookup = btrfs_lookup, |
5704 | .permission = btrfs_permission, | 5704 | .permission = btrfs_permission, |
5705 | }; | 5705 | }; |
@@ -5742,7 +5742,7 @@ static struct extent_io_ops btrfs_extent_io_ops = { | |||
5742 | * | 5742 | * |
5743 | * For now we're avoiding this by dropping bmap. | 5743 | * For now we're avoiding this by dropping bmap. |
5744 | */ | 5744 | */ |
5745 | static struct address_space_operations btrfs_aops = { | 5745 | static const struct address_space_operations btrfs_aops = { |
5746 | .readpage = btrfs_readpage, | 5746 | .readpage = btrfs_readpage, |
5747 | .writepage = btrfs_writepage, | 5747 | .writepage = btrfs_writepage, |
5748 | .writepages = btrfs_writepages, | 5748 | .writepages = btrfs_writepages, |
@@ -5752,16 +5752,17 @@ static struct address_space_operations btrfs_aops = { | |||
5752 | .invalidatepage = btrfs_invalidatepage, | 5752 | .invalidatepage = btrfs_invalidatepage, |
5753 | .releasepage = btrfs_releasepage, | 5753 | .releasepage = btrfs_releasepage, |
5754 | .set_page_dirty = btrfs_set_page_dirty, | 5754 | .set_page_dirty = btrfs_set_page_dirty, |
5755 | .error_remove_page = generic_error_remove_page, | ||
5755 | }; | 5756 | }; |
5756 | 5757 | ||
5757 | static struct address_space_operations btrfs_symlink_aops = { | 5758 | static const struct address_space_operations btrfs_symlink_aops = { |
5758 | .readpage = btrfs_readpage, | 5759 | .readpage = btrfs_readpage, |
5759 | .writepage = btrfs_writepage, | 5760 | .writepage = btrfs_writepage, |
5760 | .invalidatepage = btrfs_invalidatepage, | 5761 | .invalidatepage = btrfs_invalidatepage, |
5761 | .releasepage = btrfs_releasepage, | 5762 | .releasepage = btrfs_releasepage, |
5762 | }; | 5763 | }; |
5763 | 5764 | ||
5764 | static struct inode_operations btrfs_file_inode_operations = { | 5765 | static const struct inode_operations btrfs_file_inode_operations = { |
5765 | .truncate = btrfs_truncate, | 5766 | .truncate = btrfs_truncate, |
5766 | .getattr = btrfs_getattr, | 5767 | .getattr = btrfs_getattr, |
5767 | .setattr = btrfs_setattr, | 5768 | .setattr = btrfs_setattr, |
@@ -5773,7 +5774,7 @@ static struct inode_operations btrfs_file_inode_operations = { | |||
5773 | .fallocate = btrfs_fallocate, | 5774 | .fallocate = btrfs_fallocate, |
5774 | .fiemap = btrfs_fiemap, | 5775 | .fiemap = btrfs_fiemap, |
5775 | }; | 5776 | }; |
5776 | static struct inode_operations btrfs_special_inode_operations = { | 5777 | static const struct inode_operations btrfs_special_inode_operations = { |
5777 | .getattr = btrfs_getattr, | 5778 | .getattr = btrfs_getattr, |
5778 | .setattr = btrfs_setattr, | 5779 | .setattr = btrfs_setattr, |
5779 | .permission = btrfs_permission, | 5780 | .permission = btrfs_permission, |
@@ -5782,7 +5783,7 @@ static struct inode_operations btrfs_special_inode_operations = { | |||
5782 | .listxattr = btrfs_listxattr, | 5783 | .listxattr = btrfs_listxattr, |
5783 | .removexattr = btrfs_removexattr, | 5784 | .removexattr = btrfs_removexattr, |
5784 | }; | 5785 | }; |
5785 | static struct inode_operations btrfs_symlink_inode_operations = { | 5786 | static const struct inode_operations btrfs_symlink_inode_operations = { |
5786 | .readlink = generic_readlink, | 5787 | .readlink = generic_readlink, |
5787 | .follow_link = page_follow_link_light, | 5788 | .follow_link = page_follow_link_light, |
5788 | .put_link = page_put_link, | 5789 | .put_link = page_put_link, |