From ded91f0814a349e36b3ca0eff497f816ad518fba Mon Sep 17 00:00:00 2001 From: Xiao Guangrong Date: Thu, 14 Jul 2011 03:19:27 +0000 Subject: Btrfs: clean up for wait_extent_bit() We can just use cond_resched_lock(). Signed-off-by: Xiao Guangrong Signed-off-by: Li Zefan Signed-off-by: Chris Mason --- fs/btrfs/extent_io.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'fs') diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 0d69425d0197..a0811e639f58 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -648,11 +648,7 @@ again: 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); -- cgit v1.2.1