aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/extent_io.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 09582b81640c..c09a40db53db 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -1481,10 +1481,12 @@ static noinline u64 find_delalloc_range(struct extent_io_tree *tree,
1481 *end = state->end; 1481 *end = state->end;
1482 cur_start = state->end + 1; 1482 cur_start = state->end + 1;
1483 node = rb_next(node); 1483 node = rb_next(node);
1484 if (!node)
1485 break;
1486 total_bytes += state->end - state->start + 1; 1484 total_bytes += state->end - state->start + 1;
1487 if (total_bytes >= max_bytes) 1485 if (total_bytes >= max_bytes) {
1486 *end = *start + max_bytes - 1;
1487 break;
1488 }
1489 if (!node)
1488 break; 1490 break;
1489 } 1491 }
1490out: 1492out: