Skip to content

Commit

Permalink
Btrfs: clean up for wait_extent_bit()
Browse files Browse the repository at this point in the history
We can just use cond_resched_lock().

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Xiao Guangrong authored and Chris Mason committed Aug 1, 2011
1 parent 3150b69 commit ded91f0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,11 +648,7 @@ int wait_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, int bits)
if (start > end)
break;

if (need_resched()) {
spin_unlock(&tree->lock);
cond_resched();
spin_lock(&tree->lock);
}
cond_resched_lock(&tree->lock);
}
out:
spin_unlock(&tree->lock);
Expand Down

0 comments on commit ded91f0

Please sign in to comment.