diff options
Diffstat (limited to 'fs/btrfs')
| -rw-r--r-- | fs/btrfs/acl.c | 44 | ||||
| -rw-r--r-- | fs/btrfs/btrfs_inode.h | 4 | ||||
| -rw-r--r-- | fs/btrfs/compression.c | 1 | ||||
| -rw-r--r-- | fs/btrfs/ctree.h | 2 | ||||
| -rw-r--r-- | fs/btrfs/disk-io.c | 26 | ||||
| -rw-r--r-- | fs/btrfs/file.c | 1 | ||||
| -rw-r--r-- | fs/btrfs/inode.c | 26 | ||||
| -rw-r--r-- | fs/btrfs/ioctl.c | 1 | ||||
| -rw-r--r-- | fs/btrfs/super.c | 12 |
9 files changed, 32 insertions, 85 deletions
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 603972576f0f..f128427b995b 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c | |||
| @@ -29,51 +29,28 @@ | |||
| 29 | 29 | ||
| 30 | #ifdef CONFIG_FS_POSIX_ACL | 30 | #ifdef CONFIG_FS_POSIX_ACL |
| 31 | 31 | ||
| 32 | static void btrfs_update_cached_acl(struct inode *inode, | ||
| 33 | struct posix_acl **p_acl, | ||
| 34 | struct posix_acl *acl) | ||
| 35 | { | ||
| 36 | spin_lock(&inode->i_lock); | ||
| 37 | if (*p_acl && *p_acl != BTRFS_ACL_NOT_CACHED) | ||
| 38 | posix_acl_release(*p_acl); | ||
| 39 | *p_acl = posix_acl_dup(acl); | ||
| 40 | spin_unlock(&inode->i_lock); | ||
| 41 | } | ||
| 42 | |||
| 43 | static struct posix_acl *btrfs_get_acl(struct inode *inode, int type) | 32 | static struct posix_acl *btrfs_get_acl(struct inode *inode, int type) |
| 44 | { | 33 | { |
| 45 | int size; | 34 | int size; |
| 46 | const char *name; | 35 | const char *name; |
| 47 | char *value = NULL; | 36 | char *value = NULL; |
| 48 | struct posix_acl *acl = NULL, **p_acl; | 37 | struct posix_acl *acl; |
| 38 | |||
| 39 | acl = get_cached_acl(inode, type); | ||
| 40 | if (acl != ACL_NOT_CACHED) | ||
| 41 | return acl; | ||
| 49 | 42 | ||
| 50 | switch (type) { | 43 | switch (type) { |
| 51 | case ACL_TYPE_ACCESS: | 44 | case ACL_TYPE_ACCESS: |
| 52 | name = POSIX_ACL_XATTR_ACCESS; | 45 | name = POSIX_ACL_XATTR_ACCESS; |
| 53 | p_acl = &BTRFS_I(inode)->i_acl; | ||
| 54 | break; | 46 | break; |
| 55 | case ACL_TYPE_DEFAULT: | 47 | case ACL_TYPE_DEFAULT: |
| 56 | name = POSIX_ACL_XATTR_DEFAULT; | 48 | name = POSIX_ACL_XATTR_DEFAULT; |
| 57 | p_acl = &BTRFS_I(inode)->i_default_acl; | ||
| 58 | break; | 49 | break; |
| 59 | default: | 50 | default: |
| 60 | return ERR_PTR(-EINVAL); | 51 | BUG(); |
| 61 | } | 52 | } |
| 62 | 53 | ||
| 63 | /* Handle the cached NULL acl case without locking */ | ||
| 64 | acl = ACCESS_ONCE(*p_acl); | ||
| 65 | if (!acl) | ||
| 66 | return acl; | ||
| 67 | |||
| 68 | spin_lock(&inode->i_lock); | ||
| 69 | acl = *p_acl; | ||
| 70 | if (acl != BTRFS_ACL_NOT_CACHED) | ||
| 71 | acl = posix_acl_dup(acl); | ||
| 72 | spin_unlock(&inode->i_lock); | ||
| 73 | |||
| 74 | if (acl != BTRFS_ACL_NOT_CACHED) | ||
| 75 | return acl; | ||
| 76 | |||
| 77 | size = __btrfs_getxattr(inode, name, "", 0); | 54 | size = __btrfs_getxattr(inode, name, "", 0); |
| 78 | if (size > 0) { | 55 | if (size > 0) { |
| 79 | value = kzalloc(size, GFP_NOFS); | 56 | value = kzalloc(size, GFP_NOFS); |
| @@ -82,13 +59,13 @@ static struct posix_acl *btrfs_get_acl(struct inode *inode, int type) | |||
| 82 | size = __btrfs_getxattr(inode, name, value, size); | 59 | size = __btrfs_getxattr(inode, name, value, size); |
| 83 | if (size > 0) { | 60 | if (size > 0) { |
| 84 | acl = posix_acl_from_xattr(value, size); | 61 | acl = posix_acl_from_xattr(value, size); |
| 85 | btrfs_update_cached_acl(inode, p_acl, acl); | 62 | set_cached_acl(inode, type, acl); |
| 86 | } | 63 | } |
| 87 | kfree(value); | 64 | kfree(value); |
| 88 | } else if (size == -ENOENT || size == -ENODATA || size == 0) { | 65 | } else if (size == -ENOENT || size == -ENODATA || size == 0) { |
| 89 | /* FIXME, who returns -ENOENT? I think nobody */ | 66 | /* FIXME, who returns -ENOENT? I think nobody */ |
| 90 | acl = NULL; | 67 | acl = NULL; |
| 91 | btrfs_update_cached_acl(inode, p_acl, acl); | 68 | set_cached_acl(inode, type, acl); |
| 92 | } else { | 69 | } else { |
| 93 | acl = ERR_PTR(-EIO); | 70 | acl = ERR_PTR(-EIO); |
| 94 | } | 71 | } |
| @@ -121,7 +98,6 @@ static int btrfs_set_acl(struct inode *inode, struct posix_acl *acl, int type) | |||
| 121 | { | 98 | { |
| 122 | int ret, size = 0; | 99 | int ret, size = 0; |
| 123 | const char *name; | 100 | const char *name; |
| 124 | struct posix_acl **p_acl; | ||
| 125 | char *value = NULL; | 101 | char *value = NULL; |
| 126 | mode_t mode; | 102 | mode_t mode; |
| 127 | 103 | ||
| @@ -141,13 +117,11 @@ static int btrfs_set_acl(struct inode *inode, struct posix_acl *acl, int type) | |||
| 141 | ret = 0; | 117 | ret = 0; |
| 142 | inode->i_mode = mode; | 118 | inode->i_mode = mode; |
| 143 | name = POSIX_ACL_XATTR_ACCESS; | 119 | name = POSIX_ACL_XATTR_ACCESS; |
| 144 | p_acl = &BTRFS_I(inode)->i_acl; | ||
| 145 | break; | 120 | break; |
| 146 | case ACL_TYPE_DEFAULT: | 121 | case ACL_TYPE_DEFAULT: |
| 147 | if (!S_ISDIR(inode->i_mode)) | 122 | if (!S_ISDIR(inode->i_mode)) |
| 148 | return acl ? -EINVAL : 0; | 123 | return acl ? -EINVAL : 0; |
| 149 | name = POSIX_ACL_XATTR_DEFAULT; | 124 | name = POSIX_ACL_XATTR_DEFAULT; |
| 150 | p_acl = &BTRFS_I(inode)->i_default_acl; | ||
| 151 | break; | 125 | break; |
| 152 | default: | 126 | default: |
| 153 | return -EINVAL; | 127 | return -EINVAL; |
| @@ -172,7 +146,7 @@ out: | |||
| 172 | kfree(value); | 146 | kfree(value); |
| 173 | 147 | ||
| 174 | if (!ret) | 148 | if (!ret) |
| 175 | btrfs_update_cached_acl(inode, p_acl, acl); | 149 | set_cached_acl(inode, type, acl); |
| 176 | 150 | ||
| 177 | return ret; | 151 | return ret; |
| 178 | } | 152 | } |
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index acb4f3517582..ea1ea0af8c0e 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h | |||
| @@ -53,10 +53,6 @@ struct btrfs_inode { | |||
| 53 | /* used to order data wrt metadata */ | 53 | /* used to order data wrt metadata */ |
| 54 | struct btrfs_ordered_inode_tree ordered_tree; | 54 | struct btrfs_ordered_inode_tree ordered_tree; |
| 55 | 55 | ||
| 56 | /* standard acl pointers */ | ||
| 57 | struct posix_acl *i_acl; | ||
| 58 | struct posix_acl *i_default_acl; | ||
| 59 | |||
| 60 | /* for keeping track of orphaned inodes */ | 56 | /* for keeping track of orphaned inodes */ |
| 61 | struct list_head i_orphan; | 57 | struct list_head i_orphan; |
| 62 | 58 | ||
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index de1e2fd32080..9d8ba4d54a37 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.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> |
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 17ad92c29cfd..215ef8cae823 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
| @@ -41,8 +41,6 @@ struct btrfs_ordered_sum; | |||
| 41 | 41 | ||
| 42 | #define BTRFS_MAGIC "_BHRfS_M" | 42 | #define BTRFS_MAGIC "_BHRfS_M" |
| 43 | 43 | ||
| 44 | #define BTRFS_ACL_NOT_CACHED ((void *)-1) | ||
| 45 | |||
| 46 | #define BTRFS_MAX_LEVEL 8 | 44 | #define BTRFS_MAX_LEVEL 8 |
| 47 | 45 | ||
| 48 | #define BTRFS_COMPAT_EXTENT_TREE_V0 | 46 | #define BTRFS_COMPAT_EXTENT_TREE_V0 |
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 3a9b88759880..7dcaa8138864 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
| @@ -42,6 +42,8 @@ | |||
| 42 | static struct extent_io_ops btree_extent_io_ops; | 42 | static struct extent_io_ops btree_extent_io_ops; |
| 43 | static void end_workqueue_fn(struct btrfs_work *work); | 43 | static void end_workqueue_fn(struct btrfs_work *work); |
| 44 | 44 | ||
| 45 | static atomic_t btrfs_bdi_num = ATOMIC_INIT(0); | ||
| 46 | |||
| 45 | /* | 47 | /* |
| 46 | * end_io_wq structs are used to do processing in task context when an IO is | 48 | * end_io_wq structs are used to do processing in task context when an IO is |
| 47 | * complete. This is used during reads to verify checksums, and it is used | 49 | * complete. This is used during reads to verify checksums, and it is used |
| @@ -1343,12 +1345,25 @@ static void btrfs_unplug_io_fn(struct backing_dev_info *bdi, struct page *page) | |||
| 1343 | free_extent_map(em); | 1345 | free_extent_map(em); |
| 1344 | } | 1346 | } |
| 1345 | 1347 | ||
| 1348 | /* | ||
| 1349 | * If this fails, caller must call bdi_destroy() to get rid of the | ||
| 1350 | * bdi again. | ||
| 1351 | */ | ||
| 1346 | static int setup_bdi(struct btrfs_fs_info *info, struct backing_dev_info *bdi) | 1352 | static int setup_bdi(struct btrfs_fs_info *info, struct backing_dev_info *bdi) |
| 1347 | { | 1353 | { |
| 1348 | bdi_init(bdi); | 1354 | int err; |
| 1355 | |||
| 1356 | bdi->capabilities = BDI_CAP_MAP_COPY; | ||
| 1357 | err = bdi_init(bdi); | ||
| 1358 | if (err) | ||
| 1359 | return err; | ||
| 1360 | |||
| 1361 | err = bdi_register(bdi, NULL, "btrfs-%d", | ||
| 1362 | atomic_inc_return(&btrfs_bdi_num)); | ||
| 1363 | if (err) | ||
| 1364 | return err; | ||
| 1365 | |||
| 1349 | bdi->ra_pages = default_backing_dev_info.ra_pages; | 1366 | bdi->ra_pages = default_backing_dev_info.ra_pages; |
| 1350 | bdi->state = 0; | ||
| 1351 | bdi->capabilities = default_backing_dev_info.capabilities; | ||
| 1352 | bdi->unplug_io_fn = btrfs_unplug_io_fn; | 1367 | bdi->unplug_io_fn = btrfs_unplug_io_fn; |
| 1353 | bdi->unplug_io_data = info; | 1368 | bdi->unplug_io_data = info; |
| 1354 | bdi->congested_fn = btrfs_congested_fn; | 1369 | bdi->congested_fn = btrfs_congested_fn; |
| @@ -1570,7 +1585,8 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
| 1570 | fs_info->sb = sb; | 1585 | fs_info->sb = sb; |
| 1571 | fs_info->max_extent = (u64)-1; | 1586 | fs_info->max_extent = (u64)-1; |
| 1572 | fs_info->max_inline = 8192 * 1024; | 1587 | fs_info->max_inline = 8192 * 1024; |
| 1573 | setup_bdi(fs_info, &fs_info->bdi); | 1588 | if (setup_bdi(fs_info, &fs_info->bdi)) |
| 1589 | goto fail_bdi; | ||
| 1574 | fs_info->btree_inode = new_inode(sb); | 1590 | fs_info->btree_inode = new_inode(sb); |
| 1575 | fs_info->btree_inode->i_ino = 1; | 1591 | fs_info->btree_inode->i_ino = 1; |
| 1576 | fs_info->btree_inode->i_nlink = 1; | 1592 | fs_info->btree_inode->i_nlink = 1; |
| @@ -1957,8 +1973,8 @@ fail_iput: | |||
| 1957 | 1973 | ||
| 1958 | btrfs_close_devices(fs_info->fs_devices); | 1974 | btrfs_close_devices(fs_info->fs_devices); |
| 1959 | btrfs_mapping_tree_free(&fs_info->mapping_tree); | 1975 | btrfs_mapping_tree_free(&fs_info->mapping_tree); |
| 1976 | fail_bdi: | ||
| 1960 | bdi_destroy(&fs_info->bdi); | 1977 | bdi_destroy(&fs_info->bdi); |
| 1961 | |||
| 1962 | fail: | 1978 | fail: |
| 1963 | kfree(extent_root); | 1979 | kfree(extent_root); |
| 1964 | kfree(tree_root); | 1980 | kfree(tree_root); |
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 7c3cd248d8d6..4b833972273a 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
| @@ -22,7 +22,6 @@ | |||
| 22 | #include <linux/time.h> | 22 | #include <linux/time.h> |
| 23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
| 24 | #include <linux/string.h> | 24 | #include <linux/string.h> |
| 25 | #include <linux/smp_lock.h> | ||
| 26 | #include <linux/backing-dev.h> | 25 | #include <linux/backing-dev.h> |
| 27 | #include <linux/mpage.h> | 26 | #include <linux/mpage.h> |
| 28 | #include <linux/swap.h> | 27 | #include <linux/swap.h> |
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) |
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 9f4db848db10..bd88f25889f7 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
| @@ -27,7 +27,6 @@ | |||
| 27 | #include <linux/time.h> | 27 | #include <linux/time.h> |
| 28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
| 29 | #include <linux/string.h> | 29 | #include <linux/string.h> |
| 30 | #include <linux/smp_lock.h> | ||
| 31 | #include <linux/backing-dev.h> | 30 | #include <linux/backing-dev.h> |
| 32 | #include <linux/mount.h> | 31 | #include <linux/mount.h> |
| 33 | #include <linux/mpage.h> | 32 | #include <linux/mpage.h> |
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 708ac06b953b..6d6d06cb6dfc 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
| @@ -26,7 +26,6 @@ | |||
| 26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
| 27 | #include <linux/seq_file.h> | 27 | #include <linux/seq_file.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/mount.h> | 30 | #include <linux/mount.h> |
| 32 | #include <linux/mpage.h> | 31 | #include <linux/mpage.h> |
| @@ -394,10 +393,6 @@ int btrfs_sync_fs(struct super_block *sb, int wait) | |||
| 394 | struct btrfs_root *root = btrfs_sb(sb); | 393 | struct btrfs_root *root = btrfs_sb(sb); |
| 395 | int ret; | 394 | int ret; |
| 396 | 395 | ||
| 397 | if (sb->s_flags & MS_RDONLY) | ||
| 398 | return 0; | ||
| 399 | |||
| 400 | sb->s_dirt = 0; | ||
| 401 | if (!wait) { | 396 | if (!wait) { |
| 402 | filemap_flush(root->fs_info->btree_inode->i_mapping); | 397 | filemap_flush(root->fs_info->btree_inode->i_mapping); |
| 403 | return 0; | 398 | return 0; |
| @@ -408,7 +403,6 @@ int btrfs_sync_fs(struct super_block *sb, int wait) | |||
| 408 | 403 | ||
| 409 | trans = btrfs_start_transaction(root, 1); | 404 | trans = btrfs_start_transaction(root, 1); |
| 410 | ret = btrfs_commit_transaction(trans, root); | 405 | ret = btrfs_commit_transaction(trans, root); |
| 411 | sb->s_dirt = 0; | ||
| 412 | return ret; | 406 | return ret; |
| 413 | } | 407 | } |
| 414 | 408 | ||
| @@ -454,11 +448,6 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
| 454 | return 0; | 448 | return 0; |
| 455 | } | 449 | } |
| 456 | 450 | ||
| 457 | static void btrfs_write_super(struct super_block *sb) | ||
| 458 | { | ||
| 459 | sb->s_dirt = 0; | ||
| 460 | } | ||
| 461 | |||
| 462 | static int btrfs_test_super(struct super_block *s, void *data) | 451 | static int btrfs_test_super(struct super_block *s, void *data) |
| 463 | { | 452 | { |
| 464 | struct btrfs_fs_devices *test_fs_devices = data; | 453 | struct btrfs_fs_devices *test_fs_devices = data; |
| @@ -689,7 +678,6 @@ static int btrfs_unfreeze(struct super_block *sb) | |||
| 689 | static struct super_operations btrfs_super_ops = { | 678 | static struct super_operations btrfs_super_ops = { |
| 690 | .delete_inode = btrfs_delete_inode, | 679 | .delete_inode = btrfs_delete_inode, |
| 691 | .put_super = btrfs_put_super, | 680 | .put_super = btrfs_put_super, |
| 692 | .write_super = btrfs_write_super, | ||
| 693 | .sync_fs = btrfs_sync_fs, | 681 | .sync_fs = btrfs_sync_fs, |
| 694 | .show_options = btrfs_show_options, | 682 | .show_options = btrfs_show_options, |
| 695 | .write_inode = btrfs_write_inode, | 683 | .write_inode = btrfs_write_inode, |
