aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent_map.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index 44be9cfd30ee..ff8881fb56d6 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -1044,6 +1044,8 @@ search_again:
1044 if (state->state & EXTENT_LOCKED) { 1044 if (state->state & EXTENT_LOCKED) {
1045 DEFINE_WAIT(wait); 1045 DEFINE_WAIT(wait);
1046 atomic_inc(&state->refs); 1046 atomic_inc(&state->refs);
1047 prepare_to_wait(&state->wq, &wait,
1048 TASK_UNINTERRUPTIBLE);
1047 write_unlock_irq(&tree->lock); 1049 write_unlock_irq(&tree->lock);
1048 schedule(); 1050 schedule();
1049 write_lock_irq(&tree->lock); 1051 write_lock_irq(&tree->lock);
@@ -1059,7 +1061,7 @@ search_again:
1059 node = rb_next(node); 1061 node = rb_next(node);
1060 if (!node) 1062 if (!node)
1061 break; 1063 break;
1062 total_bytes = state->end - state->start + 1; 1064 total_bytes += state->end - state->start + 1;
1063 if (total_bytes >= max_bytes) 1065 if (total_bytes >= max_bytes)
1064 break; 1066 break;
1065 } 1067 }