aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/extent-tree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index a4db88da125..b172b7fa488 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -5079,7 +5079,9 @@ have_block_group:
5079 * group is does point to and try again 5079 * group is does point to and try again
5080 */ 5080 */
5081 if (!last_ptr_loop && last_ptr->block_group && 5081 if (!last_ptr_loop && last_ptr->block_group &&
5082 last_ptr->block_group != block_group) { 5082 last_ptr->block_group != block_group &&
5083 index <=
5084 get_block_group_index(last_ptr->block_group)) {
5083 5085
5084 btrfs_put_block_group(block_group); 5086 btrfs_put_block_group(block_group);
5085 block_group = last_ptr->block_group; 5087 block_group = last_ptr->block_group;