diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-12-19 12:03:58 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-12-19 12:03:58 +0800 |
commit | 28610abf4a574c33ca70e3d7b0e523fdede488d1 (patch) | |
tree | 5b71eaa5fef96701ed53c5830fb0d299d589f36f /fs/btrfs/extent-tree.c | |
parent | 56c3829d86a8dc060b591b4e841e0e721b6f9518 (diff) | |
parent | 0c37397b6b8708f3cae24a8faeed2d1c84760892 (diff) |
Merge remote-tracking branch 'rt-stable/v4.9-rt' into linux-linaro-lsk-v4.9-rt
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 705bb5f5a87f..c4cff5cc9c93 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -3397,13 +3397,6 @@ again: goto again; } - /* We've already setup this transaction, go ahead and exit */ - if (block_group->cache_generation == trans->transid && - i_size_read(inode)) { - dcs = BTRFS_DC_SETUP; - goto out_put; - } - /* * We want to set the generation to 0, that way if anything goes wrong * from here on out we know not to trust this cache when we load up next @@ -3427,6 +3420,13 @@ again: } WARN_ON(ret); + /* We've already setup this transaction, go ahead and exit */ + if (block_group->cache_generation == trans->transid && + i_size_read(inode)) { + dcs = BTRFS_DC_SETUP; + goto out_put; + } + if (i_size_read(inode) > 0) { ret = btrfs_check_trunc_cache_free_space(root, &root->fs_info->global_block_rsv); |