diff options
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 3ea827ddf0fe..56fe83fa60c4 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/time.h> | 26 | #include <linux/time.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/string.h> | 28 | #include <linux/string.h> |
29 | #include <linux/smp_lock.h> | ||
30 | #include <linux/backing-dev.h> | 29 | #include <linux/backing-dev.h> |
31 | #include <linux/mpage.h> | 30 | #include <linux/mpage.h> |
32 | #include <linux/swap.h> | 31 | #include <linux/swap.h> |
@@ -2122,10 +2121,8 @@ static void btrfs_read_locked_inode(struct inode *inode) | |||
2122 | * any xattrs or acls | 2121 | * any xattrs or acls |
2123 | */ | 2122 | */ |
2124 | maybe_acls = acls_after_inode_item(leaf, path->slots[0], inode->i_ino); | 2123 | maybe_acls = acls_after_inode_item(leaf, path->slots[0], inode->i_ino); |
2125 | if (!maybe_acls) { | 2124 | if (!maybe_acls) |
2126 | BTRFS_I(inode)->i_acl = NULL; | 2125 | cache_no_acl(inode); |
2127 | BTRFS_I(inode)->i_default_acl = NULL; | ||
2128 | } | ||
2129 | 2126 | ||
2130 | BTRFS_I(inode)->block_group = btrfs_find_block_group(root, 0, | 2127 | BTRFS_I(inode)->block_group = btrfs_find_block_group(root, 0, |
2131 | alloc_group_block, 0); | 2128 | alloc_group_block, 0); |
@@ -2322,7 +2319,6 @@ err: | |||
2322 | btrfs_update_inode(trans, root, dir); | 2319 | btrfs_update_inode(trans, root, dir); |
2323 | btrfs_drop_nlink(inode); | 2320 | btrfs_drop_nlink(inode); |
2324 | ret = btrfs_update_inode(trans, root, inode); | 2321 | ret = btrfs_update_inode(trans, root, inode); |
2325 | dir->i_sb->s_dirt = 1; | ||
2326 | out: | 2322 | out: |
2327 | return ret; | 2323 | return ret; |
2328 | } | 2324 | } |
@@ -2806,7 +2802,6 @@ error: | |||
2806 | pending_del_nr); | 2802 | pending_del_nr); |
2807 | } | 2803 | } |
2808 | btrfs_free_path(path); | 2804 | btrfs_free_path(path); |
2809 | inode->i_sb->s_dirt = 1; | ||
2810 | return ret; | 2805 | return ret; |
2811 | } | 2806 | } |
2812 | 2807 | ||
@@ -3143,9 +3138,6 @@ static noinline void init_btrfs_i(struct inode *inode) | |||
3143 | { | 3138 | { |
3144 | struct btrfs_inode *bi = BTRFS_I(inode); | 3139 | struct btrfs_inode *bi = BTRFS_I(inode); |
3145 | 3140 | ||
3146 | bi->i_acl = BTRFS_ACL_NOT_CACHED; | ||
3147 | bi->i_default_acl = BTRFS_ACL_NOT_CACHED; | ||
3148 | |||
3149 | bi->generation = 0; | 3141 | bi->generation = 0; |
3150 | bi->sequence = 0; | 3142 | bi->sequence = 0; |
3151 | bi->last_trans = 0; | 3143 | bi->last_trans = 0; |
@@ -3769,7 +3761,6 @@ static int btrfs_mknod(struct inode *dir, struct dentry *dentry, | |||
3769 | init_special_inode(inode, inode->i_mode, rdev); | 3761 | init_special_inode(inode, inode->i_mode, rdev); |
3770 | btrfs_update_inode(trans, root, inode); | 3762 | btrfs_update_inode(trans, root, inode); |
3771 | } | 3763 | } |
3772 | dir->i_sb->s_dirt = 1; | ||
3773 | btrfs_update_inode_block_group(trans, inode); | 3764 | btrfs_update_inode_block_group(trans, inode); |
3774 | btrfs_update_inode_block_group(trans, dir); | 3765 | btrfs_update_inode_block_group(trans, dir); |
3775 | out_unlock: | 3766 | out_unlock: |
@@ -3834,7 +3825,6 @@ static int btrfs_create(struct inode *dir, struct dentry *dentry, | |||
3834 | inode->i_op = &btrfs_file_inode_operations; | 3825 | inode->i_op = &btrfs_file_inode_operations; |
3835 | BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops; | 3826 | BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops; |
3836 | } | 3827 | } |
3837 | dir->i_sb->s_dirt = 1; | ||
3838 | btrfs_update_inode_block_group(trans, inode); | 3828 | btrfs_update_inode_block_group(trans, inode); |
3839 | btrfs_update_inode_block_group(trans, dir); | 3829 | btrfs_update_inode_block_group(trans, dir); |
3840 | out_unlock: | 3830 | out_unlock: |
@@ -3881,7 +3871,6 @@ static int btrfs_link(struct dentry *old_dentry, struct inode *dir, | |||
3881 | if (err) | 3871 | if (err) |
3882 | drop_inode = 1; | 3872 | drop_inode = 1; |
3883 | 3873 | ||
3884 | dir->i_sb->s_dirt = 1; | ||
3885 | btrfs_update_inode_block_group(trans, dir); | 3874 | btrfs_update_inode_block_group(trans, dir); |
3886 | err = btrfs_update_inode(trans, root, inode); | 3875 | err = btrfs_update_inode(trans, root, inode); |
3887 | 3876 | ||
@@ -3963,7 +3952,6 @@ static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) | |||
3963 | 3952 | ||
3964 | d_instantiate(dentry, inode); | 3953 | d_instantiate(dentry, inode); |
3965 | drop_on_err = 0; | 3954 | drop_on_err = 0; |
3966 | dir->i_sb->s_dirt = 1; | ||
3967 | btrfs_update_inode_block_group(trans, inode); | 3955 | btrfs_update_inode_block_group(trans, inode); |
3968 | btrfs_update_inode_block_group(trans, dir); | 3956 | btrfs_update_inode_block_group(trans, dir); |
3969 | 3957 | ||
@@ -4647,8 +4635,6 @@ struct inode *btrfs_alloc_inode(struct super_block *sb) | |||
4647 | ei->last_trans = 0; | 4635 | ei->last_trans = 0; |
4648 | ei->logged_trans = 0; | 4636 | ei->logged_trans = 0; |
4649 | btrfs_ordered_inode_tree_init(&ei->ordered_tree); | 4637 | btrfs_ordered_inode_tree_init(&ei->ordered_tree); |
4650 | ei->i_acl = BTRFS_ACL_NOT_CACHED; | ||
4651 | ei->i_default_acl = BTRFS_ACL_NOT_CACHED; | ||
4652 | INIT_LIST_HEAD(&ei->i_orphan); | 4638 | INIT_LIST_HEAD(&ei->i_orphan); |
4653 | INIT_LIST_HEAD(&ei->ordered_operations); | 4639 | INIT_LIST_HEAD(&ei->ordered_operations); |
4654 | return &ei->vfs_inode; | 4640 | return &ei->vfs_inode; |
@@ -4662,13 +4648,6 @@ void btrfs_destroy_inode(struct inode *inode) | |||
4662 | WARN_ON(!list_empty(&inode->i_dentry)); | 4648 | WARN_ON(!list_empty(&inode->i_dentry)); |
4663 | WARN_ON(inode->i_data.nrpages); | 4649 | WARN_ON(inode->i_data.nrpages); |
4664 | 4650 | ||
4665 | if (BTRFS_I(inode)->i_acl && | ||
4666 | BTRFS_I(inode)->i_acl != BTRFS_ACL_NOT_CACHED) | ||
4667 | posix_acl_release(BTRFS_I(inode)->i_acl); | ||
4668 | if (BTRFS_I(inode)->i_default_acl && | ||
4669 | BTRFS_I(inode)->i_default_acl != BTRFS_ACL_NOT_CACHED) | ||
4670 | posix_acl_release(BTRFS_I(inode)->i_default_acl); | ||
4671 | |||
4672 | /* | 4651 | /* |
4673 | * Make sure we're properly removed from the ordered operation | 4652 | * Make sure we're properly removed from the ordered operation |
4674 | * lists. | 4653 | * lists. |
@@ -4992,7 +4971,6 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry, | |||
4992 | inode->i_op = &btrfs_file_inode_operations; | 4971 | inode->i_op = &btrfs_file_inode_operations; |
4993 | BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops; | 4972 | BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops; |
4994 | } | 4973 | } |
4995 | dir->i_sb->s_dirt = 1; | ||
4996 | btrfs_update_inode_block_group(trans, inode); | 4974 | btrfs_update_inode_block_group(trans, inode); |
4997 | btrfs_update_inode_block_group(trans, dir); | 4975 | btrfs_update_inode_block_group(trans, dir); |
4998 | if (drop_inode) | 4976 | if (drop_inode) |