Skip to content

Commit

Permalink
Btrfs end_bio_extent_readpage should look for locked bits
Browse files Browse the repository at this point in the history
A recent commit caches the extent state in end_bio_extent_readpage,
but the search it does should look for locked extents.  This
fixes things to make it more effective.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason committed Apr 16, 2011
1 parent 0e4f8f8 commit 0d39920
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1761,7 +1761,7 @@ static void end_bio_extent_readpage(struct bio *bio, int err)
prefetchw(&bvec->bv_page->flags);

spin_lock(&tree->lock);
state = find_first_extent_bit_state(tree, start, 0);
state = find_first_extent_bit_state(tree, start, EXTENT_LOCKED);
if (state && state->start == start) {
/*
* take a reference on the state, unlock will drop
Expand Down

0 comments on commit 0d39920

Please sign in to comment.