aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/extent-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 652cf305a967..62051a36664a 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -541,7 +541,7 @@ static int find_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root
541 if (num_blocks == 0) { 541 if (num_blocks == 0) {
542 fill_prealloc = 1; 542 fill_prealloc = 1;
543 num_blocks = 1; 543 num_blocks = 1;
544 total_needed = min(level + 2, BTRFS_MAX_LEVEL) * 3; 544 total_needed = (min(level + 1, BTRFS_MAX_LEVEL) + 2) * 3;
545 } 545 }
546 find_search_start(root, 0); 546 find_search_start(root, 0);
547 if (info->block_group_cache && 547 if (info->block_group_cache &&