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.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index ef399a7794ff..9e138b793dc7 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
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 const 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
68static struct kmem_cache *btrfs_inode_cachep; 68static struct kmem_cache *btrfs_inode_cachep;
@@ -5729,7 +5729,7 @@ static int btrfs_permission(struct inode *inode, int mask)
5729 return generic_permission(inode, mask, btrfs_check_acl); 5729 return generic_permission(inode, mask, btrfs_check_acl);
5730} 5730}
5731 5731
5732static struct inode_operations btrfs_dir_inode_operations = { 5732static const struct inode_operations btrfs_dir_inode_operations = {
5733 .getattr = btrfs_getattr, 5733 .getattr = btrfs_getattr,
5734 .lookup = btrfs_lookup, 5734 .lookup = btrfs_lookup,
5735 .create = btrfs_create, 5735 .create = btrfs_create,
@@ -5747,12 +5747,12 @@ static struct inode_operations btrfs_dir_inode_operations = {
5747 .removexattr = btrfs_removexattr, 5747 .removexattr = btrfs_removexattr,
5748 .permission = btrfs_permission, 5748 .permission = btrfs_permission,
5749}; 5749};
5750static struct inode_operations btrfs_dir_ro_inode_operations = { 5750static const struct inode_operations btrfs_dir_ro_inode_operations = {
5751 .lookup = btrfs_lookup, 5751 .lookup = btrfs_lookup,
5752 .permission = btrfs_permission, 5752 .permission = btrfs_permission,
5753}; 5753};
5754 5754
5755static struct file_operations btrfs_dir_file_operations = { 5755static const struct file_operations btrfs_dir_file_operations = {
5756 .llseek = generic_file_llseek, 5756 .llseek = generic_file_llseek,
5757 .read = generic_read_dir, 5757 .read = generic_read_dir,
5758 .readdir = btrfs_real_readdir, 5758 .readdir = btrfs_real_readdir,
@@ -5790,7 +5790,7 @@ static struct extent_io_ops btrfs_extent_io_ops = {
5790 * 5790 *
5791 * For now we're avoiding this by dropping bmap. 5791 * For now we're avoiding this by dropping bmap.
5792 */ 5792 */
5793static struct address_space_operations btrfs_aops = { 5793static const struct address_space_operations btrfs_aops = {
5794 .readpage = btrfs_readpage, 5794 .readpage = btrfs_readpage,
5795 .writepage = btrfs_writepage, 5795 .writepage = btrfs_writepage,
5796 .writepages = btrfs_writepages, 5796 .writepages = btrfs_writepages,
@@ -5800,16 +5800,17 @@ static struct address_space_operations btrfs_aops = {
5800 .invalidatepage = btrfs_invalidatepage, 5800 .invalidatepage = btrfs_invalidatepage,
5801 .releasepage = btrfs_releasepage, 5801 .releasepage = btrfs_releasepage,
5802 .set_page_dirty = btrfs_set_page_dirty, 5802 .set_page_dirty = btrfs_set_page_dirty,
5803 .error_remove_page = generic_error_remove_page,
5803}; 5804};
5804 5805
5805static struct address_space_operations btrfs_symlink_aops = { 5806static const struct address_space_operations btrfs_symlink_aops = {
5806 .readpage = btrfs_readpage, 5807 .readpage = btrfs_readpage,
5807 .writepage = btrfs_writepage, 5808 .writepage = btrfs_writepage,
5808 .invalidatepage = btrfs_invalidatepage, 5809 .invalidatepage = btrfs_invalidatepage,
5809 .releasepage = btrfs_releasepage, 5810 .releasepage = btrfs_releasepage,
5810}; 5811};
5811 5812
5812static struct inode_operations btrfs_file_inode_operations = { 5813static const struct inode_operations btrfs_file_inode_operations = {
5813 .truncate = btrfs_truncate, 5814 .truncate = btrfs_truncate,
5814 .getattr = btrfs_getattr, 5815 .getattr = btrfs_getattr,
5815 .setattr = btrfs_setattr, 5816 .setattr = btrfs_setattr,
@@ -5821,7 +5822,7 @@ static struct inode_operations btrfs_file_inode_operations = {
5821 .fallocate = btrfs_fallocate, 5822 .fallocate = btrfs_fallocate,
5822 .fiemap = btrfs_fiemap, 5823 .fiemap = btrfs_fiemap,
5823}; 5824};
5824static struct inode_operations btrfs_special_inode_operations = { 5825static const struct inode_operations btrfs_special_inode_operations = {
5825 .getattr = btrfs_getattr, 5826 .getattr = btrfs_getattr,
5826 .setattr = btrfs_setattr, 5827 .setattr = btrfs_setattr,
5827 .permission = btrfs_permission, 5828 .permission = btrfs_permission,
@@ -5830,7 +5831,7 @@ static struct inode_operations btrfs_special_inode_operations = {
5830 .listxattr = btrfs_listxattr, 5831 .listxattr = btrfs_listxattr,
5831 .removexattr = btrfs_removexattr, 5832 .removexattr = btrfs_removexattr,
5832}; 5833};
5833static struct inode_operations btrfs_symlink_inode_operations = { 5834static const struct inode_operations btrfs_symlink_inode_operations = {
5834 .readlink = generic_readlink, 5835 .readlink = generic_readlink,
5835 .follow_link = page_follow_link_light, 5836 .follow_link = page_follow_link_light,
5836 .put_link = page_put_link, 5837 .put_link = page_put_link,