Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287895
b: refs/heads/master
c: 0449314
h: refs/heads/master
i:
  287893: af3ab3e
  287891: c519998
  287887: 0ff4123
v: v3
  • Loading branch information
Liu Bo authored and David Sterba committed Feb 16, 2012
1 parent ecde2e3 commit e332125
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 285190d99fef696ec8b0041787387f013cb71d67
refs/heads/master: 0449314a9cc5a7fb0bd42e2175a3c46f68f3a2b0
15 changes: 10 additions & 5 deletions trunk/fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,15 @@ int clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
WARN_ON(state->end < start);
last_end = state->end;

if (state->end < end && !need_resched())
next_node = rb_next(&state->rb_node);
else
next_node = NULL;

/* the state doesn't have the wanted bits, go ahead */
if (!(state->state & bits))
goto next;

/*
* | ---- desired range ---- |
* | state | or
Expand Down Expand Up @@ -565,12 +574,8 @@ int clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
goto out;
}

if (state->end < end && prealloc && !need_resched())
next_node = rb_next(&state->rb_node);
else
next_node = NULL;

set |= clear_state_bit(tree, state, &bits, wake);
next:
if (last_end == (u64)-1)
goto out;
start = last_end + 1;
Expand Down

0 comments on commit e332125

Please sign in to comment.