mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
Btrfs: small fixes for find_lock_delalloc_range.
There is a 'finish_wait', but no 'prepare_to_wait' . So I think that the 'prepare_to_wait' is missing. The second change is according to the name of variable. Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
b97f9203b4
commit
944746ec75
1 changed files with 3 additions and 1 deletions
|
@ -1044,6 +1044,8 @@ u64 find_lock_delalloc_range(struct extent_map_tree *tree,
|
||||||
if (state->state & EXTENT_LOCKED) {
|
if (state->state & EXTENT_LOCKED) {
|
||||||
DEFINE_WAIT(wait);
|
DEFINE_WAIT(wait);
|
||||||
atomic_inc(&state->refs);
|
atomic_inc(&state->refs);
|
||||||
|
prepare_to_wait(&state->wq, &wait,
|
||||||
|
TASK_UNINTERRUPTIBLE);
|
||||||
write_unlock_irq(&tree->lock);
|
write_unlock_irq(&tree->lock);
|
||||||
schedule();
|
schedule();
|
||||||
write_lock_irq(&tree->lock);
|
write_lock_irq(&tree->lock);
|
||||||
|
@ -1059,7 +1061,7 @@ u64 find_lock_delalloc_range(struct extent_map_tree *tree,
|
||||||
node = rb_next(node);
|
node = rb_next(node);
|
||||||
if (!node)
|
if (!node)
|
||||||
break;
|
break;
|
||||||
total_bytes = state->end - state->start + 1;
|
total_bytes += state->end - state->start + 1;
|
||||||
if (total_bytes >= max_bytes)
|
if (total_bytes >= max_bytes)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue