diff options
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r-- | fs/btrfs/relocation.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 4da08652004d..776f0aa128fc 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c | |||
@@ -3270,8 +3270,8 @@ static int delete_block_group_cache(struct btrfs_fs_info *fs_info, | |||
3270 | key.offset = 0; | 3270 | key.offset = 0; |
3271 | 3271 | ||
3272 | inode = btrfs_iget(fs_info->sb, &key, root, NULL); | 3272 | inode = btrfs_iget(fs_info->sb, &key, root, NULL); |
3273 | if (IS_ERR_OR_NULL(inode) || is_bad_inode(inode)) { | 3273 | if (IS_ERR(inode) || is_bad_inode(inode)) { |
3274 | if (inode && !IS_ERR(inode)) | 3274 | if (!IS_ERR(inode)) |
3275 | iput(inode); | 3275 | iput(inode); |
3276 | return -ENOENT; | 3276 | return -ENOENT; |
3277 | } | 3277 | } |
@@ -3621,7 +3621,7 @@ next: | |||
3621 | 3621 | ||
3622 | ret = find_first_extent_bit(&rc->processed_blocks, | 3622 | ret = find_first_extent_bit(&rc->processed_blocks, |
3623 | key.objectid, &start, &end, | 3623 | key.objectid, &start, &end, |
3624 | EXTENT_DIRTY); | 3624 | EXTENT_DIRTY, NULL); |
3625 | 3625 | ||
3626 | if (ret == 0 && start <= key.objectid) { | 3626 | if (ret == 0 && start <= key.objectid) { |
3627 | btrfs_release_path(path); | 3627 | btrfs_release_path(path); |
@@ -3674,7 +3674,8 @@ int prepare_to_relocate(struct reloc_control *rc) | |||
3674 | struct btrfs_trans_handle *trans; | 3674 | struct btrfs_trans_handle *trans; |
3675 | int ret; | 3675 | int ret; |
3676 | 3676 | ||
3677 | rc->block_rsv = btrfs_alloc_block_rsv(rc->extent_root); | 3677 | rc->block_rsv = btrfs_alloc_block_rsv(rc->extent_root, |
3678 | BTRFS_BLOCK_RSV_TEMP); | ||
3678 | if (!rc->block_rsv) | 3679 | if (!rc->block_rsv) |
3679 | return -ENOMEM; | 3680 | return -ENOMEM; |
3680 | 3681 | ||
@@ -4057,7 +4058,7 @@ int btrfs_relocate_block_group(struct btrfs_root *extent_root, u64 group_start) | |||
4057 | (unsigned long long)rc->block_group->flags); | 4058 | (unsigned long long)rc->block_group->flags); |
4058 | 4059 | ||
4059 | btrfs_start_delalloc_inodes(fs_info->tree_root, 0); | 4060 | btrfs_start_delalloc_inodes(fs_info->tree_root, 0); |
4060 | btrfs_wait_ordered_extents(fs_info->tree_root, 0, 0); | 4061 | btrfs_wait_ordered_extents(fs_info->tree_root, 0); |
4061 | 4062 | ||
4062 | while (1) { | 4063 | while (1) { |
4063 | mutex_lock(&fs_info->cleaner_mutex); | 4064 | mutex_lock(&fs_info->cleaner_mutex); |