diff --git a/[refs] b/[refs] index 4ce81f4dafd6..df551b6e733d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 61cfea9bb84d41b09e59822c33b3eb27acc48358 +refs/heads/master: ff1f2b4407454d926d8b143bf37e4dce66026a28 diff --git a/trunk/fs/btrfs/extent-tree.c b/trunk/fs/btrfs/extent-tree.c index a4db88da125e..b172b7fa4889 100644 --- a/trunk/fs/btrfs/extent-tree.c +++ b/trunk/fs/btrfs/extent-tree.c @@ -5079,7 +5079,9 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, * group is does point to and try again */ if (!last_ptr_loop && last_ptr->block_group && - last_ptr->block_group != block_group) { + last_ptr->block_group != block_group && + index <= + get_block_group_index(last_ptr->block_group)) { btrfs_put_block_group(block_group); block_group = last_ptr->block_group;